From 66ace6bd349749bfa4c2421e5a5ef5a2d51cfd21 Mon Sep 17 00:00:00 2001 From: Nemec Date: Fri, 20 Aug 2021 02:16:32 -0500 Subject: [PATCH] Send proper protocol to Django from Nginx In order to run over HTTPS* django requires the X-Forwarded-Proto header sent from the nginx proxy. I didn't add everything needed for TLS, but this header works with HTTP and HTTPS so I figure it might save a few people some time if they ever decide to secure their installation. \* specifically, I noticed that image URLs are requested over HTTP instead of HTTPS even when the main page is HTTPS until this header is sent --- docs/install/manual.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/install/manual.md b/docs/install/manual.md index 35ed5c81..f5cd7b0c 100644 --- a/docs/install/manual.md +++ b/docs/install/manual.md @@ -129,6 +129,7 @@ server { location / { proxy_set_header Host $http_host; proxy_pass http://unix:/var/www/recipes/recipes.sock; + proxy_set_header X-Forwarded-Proto $scheme; } } ```