Skip to content

Commit 6dc1c4c

Browse files
giohappyetj
authored andcommitted
Strip WWW-Authenticate headers from Geoserver
1 parent 1843cf0 commit 6dc1c4c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docker/nginx/geonode.conf.envsubst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ location /geoserver {
4646
# (see https://sandro-keil.de/blog/2017/07/24/let-nginx-start-if-upstream-host-is-unavailable-or-down/)
4747
set $upstream $GEOSERVER_LB_HOST_IP:$GEOSERVER_LB_PORT;
4848

49+
proxy_pass http://$upstream;
50+
4951
proxy_set_header X-Forwarded-Host $host;
5052
proxy_set_header X-Forwarded-Server $host;
5153
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -54,7 +56,9 @@ location /geoserver {
5456
proxy_set_header Upgrade $http_upgrade;
5557
proxy_set_header Connection "upgrade";
5658
proxy_hide_header X-Frame-Options;
57-
proxy_pass http://$upstream;
59+
# strip basic auth headers (mainly for the /rest requests from the client)
60+
proxy_hide_header WWW-Authenticate;
61+
5862
proxy_http_version 1.1;
5963
proxy_redirect http://$upstream $HTTP_SCHEME://$HTTP_HOST;
6064
proxy_request_buffering off;

0 commit comments

Comments
 (0)