Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide mechanism for cloud proxy to opt out of listening on ipv6 address #2014

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cloud/proxy/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,8 @@ else
exit 1
fi

if [ -n "$PL_IPV6_DISABLE" ]; then
sed -i -e "/IPV6_DISABLE_MARKER/d" /usr/local/openresty/nginx/conf/nginx.conf
fi

/usr/bin/openresty -g "daemon off;"
10 changes: 5 additions & 5 deletions src/cloud/proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ http {

# This is the default fallback server if none of the subdomains match.
server {
listen [::]:56000 default_server;
listen [::]:56000 default_server; # IPV6_DISABLE_MARKER
listen 56000;
server_name _;

Expand All @@ -96,7 +96,7 @@ http {
# This is the server that we use for all the locations that don't have a subdomain.
# This just serves the minimal pages necessary to authenticate and get into a subdomain specfic site.
server {
listen [::]:56000 ssl http2;
listen [::]:56000 ssl http2; # IPV6_DISABLE_MARKER
listen 56000 ssl http2;
server_name @PL_DOMAIN_NAME@ *.cluster.local;

Expand All @@ -121,7 +121,7 @@ http {

# This is the server for the work subdomain.
server {
listen [::]:56000 ssl http2;
listen [::]:56000 ssl http2; # IPV6_DISABLE_MARKER
listen 56000 ssl http2;
server_name work.@PL_DOMAIN_NAME@;

Expand Down Expand Up @@ -214,7 +214,7 @@ http {

# This is the proxy server for segment.
server {
listen [::]:56000 ssl http2;
listen [::]:56000 ssl http2; # IPV6_DISABLE_MARKER
listen 56000 ssl http2;
server_name segment.@PL_DOMAIN_NAME@;

Expand Down Expand Up @@ -262,7 +262,7 @@ http {

# This is the redirect to the netlify hosted site for docs.
server {
listen [::]:56000 ssl http2;
listen [::]:56000 ssl http2; # IPV6_DISABLE_MARKER
listen 56000 ssl http2;
server_name docs.@PL_DOMAIN_NAME@;

Expand Down
Loading