GoogleCloudPlatform / cloud-run-proxy

Local proxy for authenticating requests to Cloud Run
Apache License 2.0
124 stars 20 forks source link

Add use-authorization-header flag to allow for backwards compatibility #32

Closed jolliff3 closed 9 months ago

jolliff3 commented 9 months ago

PR https://github.com/GoogleCloudPlatform/cloud-run-proxy/pull/25 removed population of the "Authorization" header by default. While X-Serverless-Authorization should be used by default, it breaks pre-existing compatibility with services which perform additional authentication/authorization using the "Authorization" header. To allow for these scenarios, I've added a "use-authorization-header" flag, defaulted to false. When set, it will populate the "Authorization" header in the outgoing request instead of "X-Serverless-Authorization".