diff --git a/entrypoint.sh b/entrypoint.sh index 461e6b9..e6046f2 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,13 +1,9 @@ #!/bin/bash cd /home/container -# Make internal Docker IP address available to processes. -INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') -export INTERNAL_IP - # Replace Startup Variables MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') echo -e ":/home/container$ ${MODIFIED_STARTUP}" # Run the Server -eval ${MODIFIED_STARTUP} +eval ${MODIFIED_STARTUP} \ No newline at end of file diff --git a/nginx/conf.d/default-ssl.conf.example b/nginx/conf.d/default-ssl.conf.example index bfabcc9..b1f6878 100644 --- a/nginx/conf.d/default-ssl.conf.example +++ b/nginx/conf.d/default-ssl.conf.example @@ -7,6 +7,7 @@ server { # error_log /home/container/logs/nerror.log error; set_real_ip_from 127.0.0.1; + set_real_ip_from 172.18.0.0/16; real_ip_header CF-Connecting-IP; real_ip_recursive on; diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 59741df..655a1e1 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -7,6 +7,7 @@ server { # error_log /home/container/logs/nerror.log error; set_real_ip_from 127.0.0.1; + set_real_ip_from 172.18.0.0/16; real_ip_header CF-Connecting-IP; real_ip_recursive on; diff --git a/nginx/conf.d/default.conf.example b/nginx/conf.d/default.conf.example index 59741df..655a1e1 100644 --- a/nginx/conf.d/default.conf.example +++ b/nginx/conf.d/default.conf.example @@ -7,6 +7,7 @@ server { # error_log /home/container/logs/nerror.log error; set_real_ip_from 127.0.0.1; + set_real_ip_from 172.18.0.0/16; real_ip_header CF-Connecting-IP; real_ip_recursive on;