diff --git a/conf/nginx.conf b/conf/nginx.conf index c11d89b..47f726b 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -17,11 +17,6 @@ location ~ /api/v[0-9]+/(users/)?websocket$ { location / { client_max_body_size 50M; - - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_set_header Connection ""; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; @@ -39,4 +34,8 @@ location / { #proxy_cache_use_stale timeout; #proxy_cache_lock on; proxy_pass http://127.0.0.1:8065; + # Yunohost addition: redirect HTTP to HTTPS + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } }