From d7a143ce5ca21a0f854d2a7da7cc75f378bbfad7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 29 Jan 2021 16:46:20 +0000 Subject: [PATCH] Add HTTP->HTTPS redirect after certs are available --- nginx/http.template | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/nginx/http.template b/nginx/http.template index 6c562c7..1258635 100644 --- a/nginx/http.template +++ b/nginx/http.template @@ -4,20 +4,7 @@ server { server_name ${SNIKKET_DOMAIN}; server_name groups.${SNIKKET_DOMAIN}; - - include "/etc/nginx/snippets/snikket-common.conf"; -} - -server { - listen ${SNIKKET_TWEAK_HTTP_PORT}; - listen [::]:${SNIKKET_TWEAK_HTTP_PORT}; - server_name share.${SNIKKET_DOMAIN}; - location /upload/ { - proxy_pass http://localhost:${SNIKKET_TWEAK_INTERNAL_HTTP_PORT}; - proxy_set_header Host $host; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto https; - } + return 301 https://$host$request_uri; }