From 5cc09ce53cd3712654ef0e1b6a71b8372c329458 Mon Sep 17 00:00:00 2001 From: Philip Peterson <1326208+philip-peterson@users.noreply.github.com> Date: Fri, 20 Dec 2024 07:13:37 -0500 Subject: [PATCH] https redirect --- nixos/nginx.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/nginx.nix b/nixos/nginx.nix index a0fdad8..f826101 100644 --- a/nixos/nginx.nix +++ b/nixos/nginx.nix @@ -119,6 +119,7 @@ proxyPass = "http://127.0.0.1:3000/"; # pass through to Forgejo }; }; + "forge.quinefoundation.com-http" = { serverName = "forge.quinefoundation.com"; @@ -128,7 +129,13 @@ ]; locations."/" = { - proxyPass = "https://forge.quinefoundation.com/"; # pass through to HTTPS + # TODO: forgejo does not support HTTP+HTTPS. But it would be nice if it did. + #proxyPass = "https://forge.quinefoundation.com/"; # pass through to HTTPS + + # Instead, temporarily redirect to HTTPS + extraConfig = '' + return 302 https://$host$request_uri; + ''; }; }; };