Skip to content

Commit 04f7b60

Browse files
moonbuggyrpardini
authored andcommitted
disable IPv6 via env
1 parent 56cb4db commit 04f7b60

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ ENV PROXY_REQUEST_BUFFERING="true"
102102
- PROXY_CONNECT_READ_TIMEOUT : see [proxy_connect_read_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_read_timeout)
103103
- PROXY_CONNECT_CONNECT_TIMEOUT : see [proxy_connect_connect_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_connect_timeout)
104104
- PROXY_CONNECT_SEND_TIMEOUT : see [proxy_connect_send_timeout](https://github.com/chobits/ngx_http_proxy_connect_module#proxy_connect_send_timeout)
105+
- 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)
105106

106107

107108
### Simple (no auth, all cache)

entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ confpath=/etc/nginx/resolvers.conf
3333
if [ ! -e $confpath ]
3434
then
3535
echo "Using auto-determined resolver '$conf' via '$confpath'"
36+
if [[ "a${DISABLE_IPV6}" == "atrue" ]]; then
37+
echo "Disabling IPv6 in '$confpath'"
38+
conf="${conf%;*} ipv6=off;"
39+
fi
3640
echo "$conf" > $confpath
3741
else
3842
echo "Not using resolver config, keep existing '$confpath' -- mounted by user?"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy