diff --git a/conf/nginx.conf b/conf/nginx.conf index cbe969e..097808f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -2,6 +2,11 @@ location PATHTOCHANGE/static/ { alias /opt/yunohost/ihatemoney/src/budget/static/; } location PATHTOCHANGE { + # Force https. + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; @@ -17,6 +22,6 @@ location PATHTOCHANGE { break; } - # Include SSOWAT user panel. + # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; }