disable IPv6 via env
parent
45ad55d3f1
commit
f80fc35575
|
@ -102,6 +102,7 @@ ENV PROXY_REQUEST_BUFFERING="true"
|
||||||
- PROXY_CONNECT_READ_TIMEOUT : see [proxy_connect_read_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_read_timeout)
|
- PROXY_CONNECT_READ_TIMEOUT : see [proxy_connect_read_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_read_timeout)
|
||||||
- PROXY_CONNECT_CONNECT_TIMEOUT : see [proxy_connect_connect_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_connect_timeout)
|
- PROXY_CONNECT_CONNECT_TIMEOUT : see [proxy_connect_connect_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_connect_timeout)
|
||||||
- PROXY_CONNECT_SEND_TIMEOUT : see [proxy_connect_send_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_send_timeout))
|
- PROXY_CONNECT_SEND_TIMEOUT : see [proxy_connect_send_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_send_timeout))
|
||||||
|
- Env `DISABLE_IPV6`: If set to `true`, prevents nginx from getting IPv6 addresses from the resolver without needing a [custom resolver config](#custom_nginx_resolvers_configuration)
|
||||||
|
|
||||||
|
|
||||||
### Simple (no auth, all cache)
|
### Simple (no auth, all cache)
|
||||||
|
|
|
@ -33,6 +33,10 @@ confpath=/etc/nginx/resolvers.conf
|
||||||
if [ ! -e $confpath ]
|
if [ ! -e $confpath ]
|
||||||
then
|
then
|
||||||
echo "Using auto-determined resolver '$conf' via '$confpath'"
|
echo "Using auto-determined resolver '$conf' via '$confpath'"
|
||||||
|
if [[ "a${DISABLE_IPV6}" == "atrue" ]]; then
|
||||||
|
echo "Disabling IPv6 in '$confpath'"
|
||||||
|
conf="${conf%;*} ipv6=off;"
|
||||||
|
fi
|
||||||
echo "$conf" > $confpath
|
echo "$conf" > $confpath
|
||||||
else
|
else
|
||||||
echo "Not using resolver config, keep existing '$confpath' -- mounted by user?"
|
echo "Not using resolver config, keep existing '$confpath' -- mounted by user?"
|
||||||
|
|
Loading…
Reference in New Issue