1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mattermost_ynh.git synced 2024-09-03 19:36:29 +02:00

nginx.conf: document HTTPS redirection

This commit is contained in:
Pierre de La Morinerie 2017-12-07 12:13:33 +05:30 committed by GitHub
parent 96b4131d24
commit 0d4482c6e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}