Skip to content
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

[extension/headerssetter] Extend the headers setter extension with header modification actions. #16581

Closed
kovrus opened this issue Dec 2, 2022 · 0 comments · Fixed by #16818
Labels

Comments

@kovrus
Copy link
Member

kovrus commented Dec 2, 2022

Component(s)

extension/headerssetter

Is your feature request related to a problem? Please describe.

There will be cases when users would have to insert, update or drop certain headers, see the scenario
#7596 (comment) where users have to drop a specific header. The headers setter extension could be a good place where this functionality can be implemented.

Describe the solution you'd like

Introduce the following header actions in the header setter extension:

  • insert: Inserts the new header if it does not exist.
  • update: Updates the header value if it exists.
  • upsert: Inserts a header if it does not exist and updates the header if it exists.
  • delete: Deletes the header.

Configuration example:

extensions:
  headers_setter:
    headers:
      - key: <header>
        action: insert
        from_context: <value from context>
      - key: <header>
        action: upsert
        value: <static value>
      - key: <header>
        action: update
        from_context: <value from context>
      - key: <header>
        action: delete    

Describe alternatives you've considered

No response

Additional context

#7596

@kovrus kovrus added enhancement New feature or request needs triage New item requiring triage labels Dec 2, 2022
@jpkrohling jpkrohling added extension/headerssetter and removed needs triage New item requiring triage labels Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants