From cbe6b84841cd0fa6a11270d20f665c61db580765 Mon Sep 17 00:00:00 2001 From: anmol26s Date: Thu, 9 Nov 2017 12:56:12 +0530 Subject: [PATCH] Force https --- conf/nginx.conf | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index a241789..de3624c 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -5,7 +5,12 @@ location PATHTOCHANGE/ { proxy_buffering off; fastcgi_param REMOTE_USER $remote_user; client_max_body_size 50M; + + # Force https + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; -} \ No newline at end of file +}