Skip to content

Commit

Permalink
refs #000: enforce ipv6=off when the enforcing is enabled (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monska85 committed Sep 27, 2023
1 parent 10a65d3 commit d283d0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export NGINX_OSB_PUBLIC_PATH="${NGINX_OSB_PUBLIC_PATH:-}"
export NGINX_OSB_ASSETS_PATH="${NGINX_OSB_ASSETS_PATH:-}"
export NGINX_ASSETS_STREAM_OVER_S3="${NGINX_ASSETS_STREAM_OVER_S3:-0}"
export NGINX_OSB_RESOLVER="${NGINX_OSB_RESOLVER:-8.8.8.8 ipv6=off}"
export NGINX_OSB_RESOLVER_ENFORCE_IPV6_OFF="${NGINX_OSB_RESOLVER_ENFORCE_IPV6_OFF:-1}"
export HIDE_GOOGLE_GCS_HEADERS="${HIDE_GOOGLE_GCS_HEADERS:-1}"
export DRUPAL_PUBLIC_FILES_PATH="${DRUPAL_PUBLIC_FILES_PATH:-sites/default/files}"
export DRUPAL_ASSETS_FILES_PATH="${DRUPAL_ASSETS_FILES_PATH:-sites/default/files}"
Expand All @@ -89,6 +90,11 @@ export NGINX_XFRAME_OPTION_VALUE="${NGINX_XFRAME_OPTION_VALUE:-SAMEORIGIN}"
# Custom nginx configuration.
export NGINX_CLIENT_MAX_BODY_SIZE="${NGINX_CLIENT_MAX_BODY_SIZE:-200M}"

# Enforce IPv6 off if NGINX_OSB_RESOLVER_ENFORCE_IPV6_OFF is set to 1
if [ "${NGINX_OSB_RESOLVER_ENFORCE_IPV6_OFF}" = "1" ] && ! echo "${NGINX_OSB_RESOLVER}" | grep -q "ipv6=off"; then
export NGINX_OSB_RESOLVER="${NGINX_OSB_RESOLVER} ipv6=off"
fi

# Activate CORS on php location using a fragment.
export NGINX_CORS_ENABLED="${NGINX_CORS_ENABLED:-0}"
export NGINX_CORS_DOMAINS="${NGINX_CORS_DOMAINS}"
Expand Down

0 comments on commit d283d0b

Please sign in to comment.