home-server/roles/dmz_nextcloud_front/templates/nginx_lool.j2

50 lines
1.5 KiB
Plaintext
Raw Normal View History

2018-09-03 20:06:05 +02:00
# The home-server project produces a multi-purpose setup using Ansible.
# Copyright © 2018 Y. Gablin, under the GPL-3.0-or-later license.
# Full licensing information in the LICENSE file, or gnu.org/licences/gpl-3.0.txt if the file is missing.
# Nextcloud BUG
location ~ {{http_pfx_nextcloud}}/index.php/apps/richdocuments/(?:css|js|img|l10n|assets) {
rewrite ^{{http_pfx_nextcloud}}/index.php/apps/richdocuments(.*)$ {{http_pfx_nextcloud}}/index.php/xapps/richdocuments$1$is_args$query_string;
}
# static files
location ^~ /loleaflet {
proxy_pass http://{{SafeZone}}:9980;
proxy_set_header Host $http_host;
}
# WOPI discovery URL
location ^~ /hosting/discovery {
proxy_pass http://{{SafeZone}}:9980;
proxy_set_header Host $http_host;
}
location ^~ /lool {
# this parent location makes sure that a global PHP catch-all
# wont pre-empt the first two child locations below
# main websocket
location ~ ^/lool/(.*)/ws$ {
proxy_pass http://{{SafeZone}}:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}
# download, presentation and image upload
location ~ ^/lool {
proxy_pass http://{{SafeZone}}:9980;
proxy_set_header Host $http_host;
}
# Admin Console websocket
location ^~ /lool/adminws {
proxy_pass http://{{SafeZone}}:9980;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
proxy_read_timeout 36000s;
}
}