web: add ability to disable IPv6

This commit is contained in:
karniemi
2020-12-09 17:35:21 +02:00
committed by GitHub
parent af6f3ac69d
commit eedac14370
2 changed files with 10 additions and 0 deletions

View File

@@ -1,6 +1,9 @@
server {
listen 80 default_server;
{{ if .Env.ENABLE_IPV6 | default "1" | toBool }}
listen [::]:80 default_server;
{{ end }}
{{ if .Env.ENABLE_HTTP_REDIRECT | default "0" | toBool }}
return 301 https://$host$request_uri;
@@ -12,7 +15,10 @@ server {
{{ if not (.Env.DISABLE_HTTPS | default "0" | toBool) }}
server {
listen 443 ssl http2;
{{ if .Env.ENABLE_IPV6 | default "1" | toBool }}
listen [::]:443 ssl http2;
{{ end }}
include /config/nginx/ssl.conf;
include /config/nginx/meet.conf;