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 051fae7 commit 961fff6Copy full SHA for 961fff6
src/docker-entrypoint.sh
@@ -7,6 +7,15 @@ if [[ -n $PROXY_REVERSE_URL ]]; then
7
export UPSTREAM_SERVER=${PROXY_REVERSE_URL#http://}
8
fi
9
10
+# Add EC2 IPv4 address to allowed hosts so that load balancers can talk to us
11
+if [[ "$SERVER_NAME" != "_" ]]; then
12
+ local_ipv4=$(curl --connect-timeout 2 -s http://169.254.169.254/2009-04-04/meta-data/local-ipv4 || true 2>/dev/null)
13
+ if [[ -n "$local_ipv4" ]]
14
+ then
15
+ export SERVER_NAME="$SERVER_NAME $local_ipv4"
16
+ fi
17
+fi
18
+
19
run-parts --exit-on-error /docker-entrypoint.d
20
21
exec "$@"
0 commit comments