mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
42 lines
1.1 KiB
Nginx Configuration File
42 lines
1.1 KiB
Nginx Configuration File
root __FINALPATH__;
|
|
index index.html;
|
|
|
|
location / {
|
|
proxy_pass http://localhost:__PORT__/;
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
proxy_set_header Host $host;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection upgrade;
|
|
|
|
}
|
|
location = /cryptpad_websocket {
|
|
proxy_pass http://localhost:__PORT__;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# WebSocket support (nginx 1.4)
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection upgrade;
|
|
}
|
|
|
|
|
|
#location = /api/config {
|
|
# default_type text/javascript;
|
|
# rewrite ^.*$ /customize/api/config break;
|
|
#}
|
|
|
|
if ($uri = /pad/inner.html) {
|
|
set $scriptSrc "'self' 'unsafe-eval' 'unsafe-inline'";
|
|
}
|
|
|
|
## TODO fix in the code so that we don't need this
|
|
location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard)$ {
|
|
rewrite ^(.*)$ $1/ redirect;
|
|
}
|
|
|
|
try_files $uri $uri/index.html;
|
|
# Include SSOWAT user panel.
|
|
include conf.d/yunohost_panel.conf.inc;
|