2017-07-23 17:46:25 +02:00
|
|
|
root __FINALPATH__;
|
2017-04-28 11:34:07 +02:00
|
|
|
index index.html;
|
|
|
|
|
2017-07-04 01:19:07 +02:00
|
|
|
location / {
|
2017-07-23 17:46:25 +02:00
|
|
|
proxy_pass http://localhost:__PORT__/;
|
2017-07-04 01:19:07 +02:00
|
|
|
add_header X-Frame-Options SAMEORIGIN;
|
|
|
|
proxy_set_header Host $host;
|
2017-04-24 00:55:46 +02:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection upgrade;
|
2017-07-04 01:19:07 +02:00
|
|
|
|
|
|
|
}
|
2017-07-23 22:53:29 +02:00
|
|
|
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;
|
2017-07-04 01:19:07 +02:00
|
|
|
|
2017-07-23 22:53:29 +02:00
|
|
|
# WebSocket support (nginx 1.4)
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection upgrade;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-07-23 17:46:25 +02:00
|
|
|
#location = /api/config {
|
2017-07-23 00:14:35 +02:00
|
|
|
# default_type text/javascript;
|
|
|
|
# rewrite ^.*$ /customize/api/config break;
|
|
|
|
#}
|
2017-07-04 01:19:07 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2017-04-28 11:34:07 +02:00
|
|
|
|
2017-07-23 00:14:35 +02:00
|
|
|
try_files $uri $uri/index.html;
|
2017-07-04 01:19:07 +02:00
|
|
|
# Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|