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:
parent
96b4131d24
commit
0d4482c6e0
1 changed files with 4 additions and 5 deletions
|
@ -17,11 +17,6 @@ location ~ /api/v[0-9]+/(users/)?websocket$ {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
client_max_body_size 50M;
|
client_max_body_size 50M;
|
||||||
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
proxy_set_header Connection "";
|
proxy_set_header Connection "";
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
@ -39,4 +34,8 @@ location / {
|
||||||
#proxy_cache_use_stale timeout;
|
#proxy_cache_use_stale timeout;
|
||||||
#proxy_cache_lock on;
|
#proxy_cache_lock on;
|
||||||
proxy_pass http://127.0.0.1:8065;
|
proxy_pass http://127.0.0.1:8065;
|
||||||
|
# Yunohost addition: redirect HTTP to HTTPS
|
||||||
|
if ($scheme = http) {
|
||||||
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue