From 0d2b91c1140f74c6eed6295ebf58aa769dbe2714 Mon Sep 17 00:00:00 2001 From: Matt Wise <768067+diranged@users.noreply.github.com> Date: Tue, 22 Oct 2024 14:46:27 -0700 Subject: [PATCH] fix(nginx): remove the x-forwarded-proto check (#93) that kind of check shouldn't be required, it should be optional and based on the users environments. this will let us run gogo behind istio. Co-authored-by: Matt Wise --- resources/nginx.conf | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/resources/nginx.conf b/resources/nginx.conf index 0ea50fe..2c7a53c 100644 --- a/resources/nginx.conf +++ b/resources/nginx.conf @@ -49,7 +49,11 @@ http { '"event_name": "NGINX_LOG"' '}'; - access_log /dev/stdout main; + map $status $loggable { + ~^[23] 0; + default 1; + } + access_log /dev/stderr main if=$loggable; error_log /dev/stderr; upstream app { @@ -75,22 +79,6 @@ http { ssl_session_cache shared:SSL:10m; ssl_session_tickets off; - if ($scheme = http) { - set $redirect_to_https true; - } - - if ($http_x_forwarded_proto = "http") { - set $redirect_to_https true; - } - - if ($hostname = gogo-dev) { - set $redirect_to_https false; - } - - if ($redirect_to_https = true) { - rewrite ^(.*) https://$host$1; - } - # Web UI static content location /static { alias /app/static/;