We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22a0cb7 commit 01f6f94Copy full SHA for 01f6f94
src/etc/nginx/templates/default.conf.template
@@ -1,3 +1,13 @@
1
+# Default configuration returns 400 in order to deny any request with an
2
+# unrecognized host header (server_name.)
3
+{{ if (ne .Env.SERVER_NAME "_") }}
4
+server {
5
+ listen {{ .Env.LISTEN_PORT }};
6
+ server_name _;
7
+ return 400;
8
+}
9
+{{ end }}
10
+
11
server {
12
listen {{ .Env.LISTEN_PORT }};
13
server_name {{ .Env.SERVER_NAME }};
test/test.sh
@@ -9,6 +9,7 @@ function fail {
LISTEN_PORT="8080" \
PROXY_REVERSE_URL="http://localhost:8081" \
+SERVER_NAME="localhost" \
STATIC_LOCATIONS="/static/:/test/static/" \
14
/docker-entrypoint.sh
15
0 commit comments