1

My Apache server is proxying a request in which it receives a header (oidc_access_token). How can I add another header, Authorization, in the forwarded request with value that includes a prefix (Bearer) and the value of the oidc_access_token header?

I tried this but it doesn't work:

<Location "/person-service" >
    RequestHeader set Authorization "Bearer %{oidc_access_token}"
    ProxyPass http://app1:9292/person-service
    ProxyPassreverse http://app1:9292/person-service
</Location>
codependent
  • 141
  • 1
  • 8

1 Answers1

3

I was missing the e to reference the incoming header as an environment variable:

<Location "/person-service" >
    RequestHeader set Authorization "Bearer %{oidc_access_token}e"
    ProxyPass http://app1:9292/person-service
    ProxyPassreverse http://app1:9292/person-service
</Location>
codependent
  • 141
  • 1
  • 8