2020-07-08 17:31:37 +02:00
|
|
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
|
|
location __PATH__/ {
|
2018-02-19 22:23:03 +01:00
|
|
|
|
2024-01-27 14:19:28 +01:00
|
|
|
alias __INSTALL_DIR__/www/;
|
|
|
|
|
2023-10-17 10:09:16 +02:00
|
|
|
index index.html;
|
|
|
|
|
|
|
|
more_set_headers "X-Frame-Options: SAMEORIGIN";
|
|
|
|
more_clear_headers "X-Content-Type-Options";
|
|
|
|
more_set_headers "X-XSS-Protection: '1; mode=block'";
|
|
|
|
more_set_headers "Content-Security-Policy: frame-ancestors 'self'";
|
|
|
|
|
2024-06-03 20:04:06 +02:00
|
|
|
# Proxy and upgrade WebSocket connection
|
|
|
|
location __PATH__/recorder/ws {
|
2024-06-03 23:49:11 +02:00
|
|
|
#rewrite ^__PATH__/recorder/(.*) /$1 break;
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/ws/;
|
2024-06-03 20:04:06 +02:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
}
|
|
|
|
|
|
|
|
location __PATH__/recorder/ {
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
# OwnTracks Recorder Views (requires /view, /static, /utils)
|
|
|
|
location __PATH__/recorder/view/ {
|
|
|
|
proxy_buffering off; # Chrome
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/view/;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
}
|
|
|
|
location __PATH__/recorder/static/ {
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/static/;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
}
|
|
|
|
location __PATH__/recorder/utils/ {
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/utils/;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
}
|
|
|
|
|
|
|
|
# HTTP Mode
|
|
|
|
location __PATH__/recorder/pub {
|
|
|
|
# Basic auth is disabled in favour of YunoHost's SSO
|
|
|
|
#auth_basic "OwnTracks pub";
|
|
|
|
#auth_basic_user_file /usr/local/etc/nginx/owntracks.htpasswd;
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/pub;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
|
|
|
# Optionally force Recorder to use username from Basic
|
|
|
|
# authentication user. Whether or not client sets
|
|
|
|
# X-Limit-U and/or uses ?u= parameter, the user will
|
|
|
|
# be set to $remote_user.
|
|
|
|
proxy_set_header X-Limit-U $remote_user;
|
|
|
|
}
|
|
|
|
|
2023-10-17 10:09:16 +02:00
|
|
|
# Include SSOWAT user panel.
|
|
|
|
include conf.d/yunohost_panel.conf.inc;
|
2018-02-19 22:23:03 +01:00
|
|
|
}
|