Skip to content

Commit

Permalink
conf(nginx): change forwarded header removing host (PROJQUAY-8024) (q…
Browse files Browse the repository at this point in the history
…uay#3327)

According to HCP support, the Ingress Load Balancer rejects requests
with a `host=...;` in the `forwarded` Header.

The PR changes that only the originating Client ($remote_addr) is
injected in the request as

```
Host: ....
Forwarded: for=127.0.0.1;
...
```
  • Loading branch information
michaelalang authored Nov 6, 2024
1 parent ce11c87 commit 0059596
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions conf/nginx/server-base.conf.jnj
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ location ~ ^/_storage_proxy/([^/]+)/([^/]+)/([^/]+)/(.+) {
proxy_set_header Host $3;
proxy_set_header Authorization "";
proxy_set_header x-forwarded-host "";
proxy_set_header forwarded "for=$remote_addr;";
proxy_ssl_name $3;
proxy_ssl_server_name on;

Expand Down

0 comments on commit 0059596

Please sign in to comment.