34 lines
1.2 KiB
PHP
34 lines
1.2 KiB
PHP
# Includable nginx configuration.
|
|
#
|
|
# Additional Filebrowser service.
|
|
# Take a look to the proxy port setting.
|
|
location ~ /(api|files|login|static) {
|
|
proxy_pass http://localhost:$PAR_PROXYPORT;
|
|
error_page 500 502 503 504 @proxy_error;
|
|
|
|
client_max_body_size 1G;
|
|
keepalive_timeout 30;
|
|
proxy_read_timeout 300;
|
|
|
|
proxy_request_buffering on;
|
|
proxy_buffers 2048 16k;
|
|
proxy_buffer_size 16k;
|
|
|
|
proxy_set_header X-Forwarded-Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-Server $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# This hack reverts a modification in Filebrowser (2.33.1):
|
|
# https://github.com/filebrowser/filebrowser/commit/8a14018861fe581672bbd27cdc3ae5691f70a108
|
|
# We don't force to download PDFs.
|
|
more_clear_headers -t 'application/pdf' 'Content-Disposition';
|
|
|
|
#websockets
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
}
|