Skip to content

Commit ace6939

Browse files
authored
Merge pull request #1586 from GSA/remove-nginx-version-from-proxy-curl
removes nginx version from proxy when curl'ed directly
2 parents 0e88b2c + 5c98004 commit ace6939

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ test: clean build
5151

5252
# everytime you added some new variables, you need to swap it with some test values
5353
# and swap it back after the test. This is because "nginx -t" test cannot read env variables.
54+
# NOTE: on Mac OS-X you need to install gnu-sed `brew install gnu-sed` and add gnubin to your $PATH
55+
# or this will error out b/c Mac uses BSD-sed
5456
validate-proxy:
5557
sed -i 's/{{nameservers}}/127.0.0.1/g' proxy/nginx.conf
5658
sed -i 's/{{env "EXTERNAL_ROUTE"}}/127.0.0.2/g' proxy/nginx.conf proxy/nginx-cloudfront.conf

proxy/nginx-common.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,5 @@ location /maptiles {
110110
proxy_pass https://tile.openstreetmap.org/;
111111
}
112112

113+
# Don't leak any server information in response headers
114+
server_tokens off;

0 commit comments

Comments
 (0)