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

Implement annotation to support headers control #165

Closed
johnlanni opened this issue Feb 6, 2023 · 0 comments
Closed

Implement annotation to support headers control #165

johnlanni opened this issue Feb 6, 2023 · 0 comments
Assignees

Comments

@johnlanni
Copy link
Collaborator

Why do you need it?

Control http request and response headers with operations such as add, update and delete.

How could it be?

format:

# add or update single header
higress.io/<request|response>-header-control-<add|update>: "foo bar"
# add or update multiple headers
higress.io/<request|response>-header-control-<add|update>: |
  foo bar
  test true
# remove single header
higress.io/<request|response>-header-control-remove: "foo"
# remove multiple headers
higress.io/<request|response>-header-control-remove: "foo,bar"

example:

apiVersion:networking.k8s.io/v1 
kind: Ingress
metadata:
  annotations:
    # add request headers
    higress.io/request-header-control-add: |
      foo bar
      test true
   # add response headers
    higress.io/response-header-control-add: |
      foo bar
      test true
  name: demo
spec:
  ingressClassName: higress
  rules:
    - host: example.com
      http:
        paths:
        -  path: /test
            pathType: Exact
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants