mirror of
https://github.com/YunoHost-Apps/lufi_ynh.git
synced 2024-09-03 19:36:28 +02:00
69053f7a82
* Upgrade to v.0.05.9 * [fix] Chromium net::ERR_HTTP2_PROTOCOL_ERROR 200 Co-authored-by: ljf (zamentur) <zamentur@users.noreply.github.com> Co-authored-by: Alexandre Aubin <alex.aubin@mailoo.org>
37 lines
1.2 KiB
Nginx Configuration File
37 lines
1.2 KiB
Nginx Configuration File
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
location __PATH__/ {
|
|
|
|
if ($scheme = http) {
|
|
rewrite ^ https://$server_name$request_uri? permanent;
|
|
}
|
|
|
|
# This is important for user's privacy!
|
|
access_log off;
|
|
error_log /var/log/nginx/lufi.error.log;
|
|
|
|
# This is important! Make it OK with your Lutim configuration
|
|
client_max_body_size __MAX_FILE_SIZE__M;
|
|
|
|
if ($request_uri ~* ^/(img|css|font|js)/) {
|
|
more_set_headers "Cache-Control: public, max-age=315360000";
|
|
}
|
|
|
|
proxy_pass http://127.0.0.1:__PORT____PATH__;
|
|
|
|
# Really important! Lufi uses WebSocket, it won't work without this
|
|
proxy_set_header Upgrade $http_upgrade ;
|
|
proxy_set_header Connection "upgrade" ;
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Remote-Port $remote_port;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# We expect the downsteam servers to redirect to the right hostname, so don't do any rewrite$
|
|
proxy_redirect off;
|
|
|
|
# Include SSOWAT user panel.
|
|
include conf.d/yunohost_panel.conf.inc;
|
|
}
|