PromucFlow_constructor/deploy/docker/route-tests/common/forwarded-headers.hurl
Shrikant Sharat Kandula e6ebfbaea1
fix: Remove Server header and allow all on port 80 (#29585)
Another attempt at #29550, which was reverted. Fallback is not happening
if cert provisioning fails _despite_ having the correct header. But with
the changes in this PR, since we'll listen on `:80`, fallback _will_
happen when cert provisioning fails due to incorrect domain
configuration.

We're also adding [Hurl](https://hurl.dev) based tests. They're not run
in any CI yet. That'll come in soon.
2023-12-18 09:44:31 +05:30

34 lines
709 B
Plaintext

GET http://local.com/oauth2/google/authorize
HTTP 200
```
Scheme = 'http'
X-Forwarded-Proto = 'http'
Host = 'local.com'
X-Forwarded-Host = 'local.com'
Forwarded = ''
```
# This is the CloudRun test. That the `Forwarded` header should be removed when proxying to upstream.
GET http://local.com/oauth2/google/authorize
Forwarded: something something
HTTP 200
```
Scheme = 'http'
X-Forwarded-Proto = 'http'
Host = 'local.com'
X-Forwarded-Host = 'local.com'
Forwarded = ''
```
GET http://local.com/oauth2/google/authorize
X-Forwarded-Proto: https
X-Forwarded-Host: overridden.com
HTTP 200
```
Scheme = 'http'
X-Forwarded-Proto = 'https'
Host = 'local.com'
X-Forwarded-Host = 'overridden.com'
Forwarded = ''
```