oauth2-proxy / manifests

For hosting manifests to allow for the deployment of OAuth2-Proxy/OAuth2-Proxy
Apache License 2.0
170 stars 153 forks source link

Question: Can we injectResponseHeaders for each upstream with alpha-config? #98

Closed lnvn closed 7 months ago

lnvn commented 2 years ago

I have a question that: can we injectResponseHeaders for each upstream like NGINX (location).

Expected Behavior

injectResponseHeaders:            #for all upstream service
  - name: xxx
    values:
      - value: xxx
upstreamConfig:
  upstreams:
    - flushInterval: 1s
      id: /
      passHostHeader: true
      path: /
      proxyWebSockets: true
      uri: http://service1:8080
    - flushInterval: 1s
      id: /service2/
      passHostHeader: true
      path: /service2/
      proxyWebSockets: true
      injectResponseHeaders:            #Expected Behavior
      - name: yyy
         values:
         - value: yyy
      uri: http://service2:8081/service2/

Current Behavior

injectResponseHeaders:
  - name: xxx
    values:
      - value: xxx
   - name: yyy
      values:
      - value: yyy
upstreamConfig:
  upstreams:
    - flushInterval: 1s
      id: /
      passHostHeader: true
      path: /
      proxyWebSockets: true
      uri: http://service1:8080
    - flushInterval: 1s
      id: /service2/
      passHostHeader: true
      path: /service2/
      proxyWebSockets: true
      uri: http://service2:8081/service2/

Context

I want some header only affect to one service.

Your Environment

Thanks!

pierluigilenoci commented 2 years ago

@iim5 feel free to open a PR for that

pierluigilenoci commented 2 years ago

@iim5 any update on this?

lnvn commented 2 years ago

@pierluigilenoci Sorry, I still don't have any further investigation on this.

pierluigilenoci commented 1 year ago

@iim5 would you like to open a PR to solve the problem?

pierluigilenoci commented 7 months ago

@lnvn, would you like to open a PR to solve the problem?

lnvn commented 7 months ago

Hi @pierluigilenoci, I have re-investigate this issue, It seem that this option is not allowed on alpha config, so we can not do it. I will close this ticket. Thanks!