From 704eaa8a1e5e1e76e927762f33b3dbc4e3b4cf23 Mon Sep 17 00:00:00 2001 From: frju365 Date: Sat, 12 Jun 2021 09:50:09 +0200 Subject: [PATCH] [feat] add https: redirection --- conf/nginx.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 4d70d5a..b56e8bd 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,9 @@ location __PATH__/ { + + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + proxy_pass http://localhost:__PORT__; proxy_redirect off; proxy_set_header Host $host; @@ -13,4 +18,4 @@ location __PATH__/ { # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; more_clear_input_headers 'Accept-Encoding'; -} \ No newline at end of file +}