8000 Global param propagation for sequential merger by thedae · Pull Request #745 · luraproject/lura · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Global param propagation for sequential merger #745

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 17, 2025

Conversation

thedae
Copy link
Member
@thedae thedae commented Jan 13, 2025

Adding a way to globally propagate params in the sequential merger without having to specify them in the UrlPattern.

The parameter propagation can be enabled specifying the sequential_propagated_params entry in the ExtraConfig.proxy namespace

Example

    {
      "endpoint": "/example",
      "backend": [
        {
          "url_pattern": "/one"
        },
        {
          "encoding": "no-op",
          "url_pattern": "/two"
        },
        {
          "url_pattern": "/three"
        }
      ],
      "extra_config": {
        "proxy": {
          "sequential": true,
          "sequential_propagated_params": [
            "resp0_id",
            "resp0_profile.name",
            "resp1"
          ]
        }
      }
    }

This configuration would:

  • Propagate the field id from /one response to both /two and /three
  • Propagate the nested field profile.name from /one response to both /two and /three
  • Propagate the full /two response to /three. This only works for no-op encoding backends

Signed-off-by: thedae <thedae@gmail.com>
Signed-off-by: thedae <thedae@gmail.com>
Signed-off-by: thedae <thedae@gmail.com>
Signed-off-by: thedae <thedae@gmail.com>
Signed-off-by: thedae <thedae@gmail.com>
@kpacha kpacha merged commit 9b8a7c3 into master Jan 17, 2025
5 checks passed
@kpacha kpacha deleted the propagate_seq_merger_params branch January 17, 2025 13:19
Copy link

This pull request was marked as resolved a long time ago and now has been automatically locked as there has not been any recent activity after it. You can still open a new issue and reference this link.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0