GoogleCloudPlatform / GoogleCloudPlatform/cloud-run-proxy

Support/FR: 'Host' header rewrite

Open
#41 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
136
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Assume you have a CR service on domain your `*.app` domain, which you have also configured to expect requests to come from these domains (CORS, CSRF, other security setting, or just plain service requirement).
You temporarily set the service to restricted (IAM) access instead of public for everyone to access (due to maintenance, for instance).
You run a local proxy to access it via localhost. But since now the service gets "http://localhost:8080" URLs, it fails or refuses serving due to URL differences (CSRF, CORS, etc.)
Is there any way to set/overwrite the "Host" header for upstream Cloud Run service?

It might also help working around some http->https upgrades which might be detected by services and prevent them to tripping on it. Maybe just add custom upstream headers alas cURL's `--header` switch?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.