caprover / nginx-reverse-proxy

A very simple reverse proxy using nginx and Docker
19 stars 41 forks source link

Disable ipv6 lookup on resolver #8

Closed riku22 closed 1 year ago

riku22 commented 1 year ago

Hello.

This pull request adds a configuration to disable IPV6 lookups in the resolver.

Currently, Docker does not support IPV6, but when you reverse proxy to a host with IPV6 enabled, the following warning is output to the log.

[warn] 12#12: *4 upstream server temporarily disabled while connecting to upstream, client: 10.0.1.9, server: _, request: "GET /test.css HTTP/1.0", upstream: "http://[xxx::xxx]:9080/test.css", host: "example.com", referrer: "https://example.com/index.html"

I have added this setting to prevent this warning. Specifically, ipv6=off is added to the resolver settings. However, I have not tested it, so it may not work properly. Also, if this setting is not appropriate, please feel free to close the pull request.

Sincerely.

githubsaturn commented 1 year ago

Thanks!