|
|
@ -61,7 +61,7 @@ server {
|
|
|
|
# add_header X-Frame-Options "SAMEORIGIN";
|
|
|
|
# add_header X-Frame-Options "SAMEORIGIN";
|
|
|
|
|
|
|
|
|
|
|
|
set $coop '';
|
|
|
|
set $coop '';
|
|
|
|
if ($uri ~ ^\/sheet\/.*$) { set $coop 'same-origin'; }
|
|
|
|
if ($uri ~ ^\/(sheet|presentation|doc)\/.*$) { set $coop 'same-origin'; }
|
|
|
|
|
|
|
|
|
|
|
|
# Enable SharedArrayBuffer in Firefox (for .xlsx export)
|
|
|
|
# Enable SharedArrayBuffer in Firefox (for .xlsx export)
|
|
|
|
add_header Cross-Origin-Resource-Policy cross-origin;
|
|
|
|
add_header Cross-Origin-Resource-Policy cross-origin;
|
|
|
@ -116,7 +116,7 @@ server {
|
|
|
|
set $unsafe 0;
|
|
|
|
set $unsafe 0;
|
|
|
|
# the following assets are loaded via the sandbox domain
|
|
|
|
# the following assets are loaded via the sandbox domain
|
|
|
|
# they unfortunately still require exceptions to the sandboxing to work correctly.
|
|
|
|
# they unfortunately still require exceptions to the sandboxing to work correctly.
|
|
|
|
if ($uri = "/sheet/inner.html") { set $unsafe 1; }
|
|
|
|
if ($uri ~ ^\/(sheet|doc|presentation)\/inner.html.*$) { set $unsafe 1; }
|
|
|
|
if ($uri ~ ^\/common\/onlyoffice\/.*\/index\.html.*$) { set $unsafe 1; }
|
|
|
|
if ($uri ~ ^\/common\/onlyoffice\/.*\/index\.html.*$) { set $unsafe 1; }
|
|
|
|
|
|
|
|
|
|
|
|
# everything except the sandbox domain is a privileged scope, as they might be used to handle keys
|
|
|
|
# everything except the sandbox domain is a privileged scope, as they might be used to handle keys
|
|
|
@ -159,7 +159,7 @@ server {
|
|
|
|
# /api/config is loaded once per page load and is used to retrieve
|
|
|
|
# /api/config is loaded once per page load and is used to retrieve
|
|
|
|
# the caching variable which is applied to every other resource
|
|
|
|
# the caching variable which is applied to every other resource
|
|
|
|
# which is loaded during that session.
|
|
|
|
# which is loaded during that session.
|
|
|
|
location = /api/config {
|
|
|
|
location ~ ^/api/(config|broadcast).*$ {
|
|
|
|
proxy_pass http://localhost:3000;
|
|
|
|
proxy_pass http://localhost:3000;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header Host $host;
|
|
|
@ -204,7 +204,7 @@ server {
|
|
|
|
# The nodejs server has some built-in forwarding rules to prevent
|
|
|
|
# The nodejs server has some built-in forwarding rules to prevent
|
|
|
|
# URLs like /pad from resulting in a 404. This simply adds a trailing slash
|
|
|
|
# URLs like /pad from resulting in a 404. This simply adds a trailing slash
|
|
|
|
# to a variety of applications.
|
|
|
|
# to a variety of applications.
|
|
|
|
location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams)$ {
|
|
|
|
location ~ ^/(register|login|settings|user|pad|drive|poll|slide|code|whiteboard|file|media|profile|contacts|todo|filepicker|debug|kanban|sheet|support|admin|notifications|teams|calendar|presentation|doc)$ {
|
|
|
|
rewrite ^(.*)$ $1/ redirect;
|
|
|
|
rewrite ^(.*)$ $1/ redirect;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|