mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
Update nginx.conf
This commit is contained in:
parent
4c9159b7e7
commit
aa7d197f00
1 changed files with 39 additions and 43 deletions
|
@ -1,15 +1,13 @@
|
|||
location / {
|
||||
if ($args ~ ver=) {
|
||||
root ROOT_PATH;
|
||||
index index.html;
|
||||
|
||||
if ($args ~ ver=) {
|
||||
set $cacheControl max-age=31536000;
|
||||
}
|
||||
# Will not set any header if it is emptystring
|
||||
add_header Cache-Control $cacheControl;
|
||||
}
|
||||
# Will not set any header if it is emptystring
|
||||
add_header Cache-Control $cacheControl;
|
||||
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
set $styleSrc "'unsafe-inline' 'self'";
|
||||
set $styleSrc "'unsafe-inline' 'self'";
|
||||
set $scriptSrc "'self'";
|
||||
set $connectSrc "'self' wss://cryptpad.fr wss://api.cryptpad.fr";
|
||||
set $fontSrc "'self'";
|
||||
|
@ -22,7 +20,7 @@ location / {
|
|||
add_header Content-Security-Policy "default-src 'none'; style-src $styleSrc; script-src $scriptSrc; connect-src $connectSrc; font-src $fontSrc; img-src $imgSrc; frame-src $frameSrc;";
|
||||
|
||||
location = /cryptpad_websocket {
|
||||
proxy_pass http://localhost:__PORT__/;
|
||||
proxy_pass http://localhost:3000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
@ -52,7 +50,5 @@ location / {
|
|||
}
|
||||
|
||||
try_files /www/$uri /www/$uri/index.html /customize/$uri;
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue