mirror of
https://github.com/rommapp/romm.git
synced 2026-02-18 00:27:41 +01:00
[ROMM-2470] Skip bind IPV6 if IPV4_ONLY is true
This commit is contained in:
@@ -39,6 +39,13 @@ done
|
||||
export ROMM_BASE_PATH=${ROMM_BASE_PATH:-/romm}
|
||||
export ROMM_PORT=${ROMM_PORT:-8080}
|
||||
|
||||
# Set IPV6_LISTEN based on IPV4_ONLY
|
||||
if [[ ${IPV4_ONLY} == "true" ]]; then
|
||||
export IPV6_LISTEN="#listen [::]:${ROMM_PORT};"
|
||||
else
|
||||
export IPV6_LISTEN="listen [::]:${ROMM_PORT};"
|
||||
fi
|
||||
|
||||
# Replace environment variables used in nginx configuration templates.
|
||||
/docker-entrypoint.d/20-envsubst-on-templates.sh >/dev/null
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ map $request_uri $coop_header {
|
||||
server {
|
||||
root /var/www/html;
|
||||
listen ${ROMM_PORT};
|
||||
listen [::]:${ROMM_PORT};
|
||||
${IPV6_LISTEN}
|
||||
server_name localhost;
|
||||
|
||||
proxy_set_header Host $http_host;
|
||||
|
||||
Reference in New Issue
Block a user