op-packages/quickfile/files/quickfile.locations
2026-05-25 22:10:00 +08:00

49 lines
1.7 KiB
Plaintext

# The default temporary storage space in OpenWrt may be limited.
# To upload large files, please modify the `client_body_temp_path`
# directory to a location with larger storage capacity.
client_max_body_size 0;
client_body_buffer_size 128k;
#client_body_temp_path /mnt/quickfile_tmp;
location /cgi-bin/luci/quickfile {
proxy_cache off;
proxy_redirect off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_connect_timeout 300;
proxy_read_timeout 300;
proxy_send_timeout 300;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://unix:/tmp/run/quickfile/quickfile.sock:;
}
location /cgi-bin/luci/quickfile/api/ {
proxy_cache off;
proxy_redirect off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_connect_timeout 300;
proxy_read_timeout 300;
proxy_send_timeout 300;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^/cgi-bin/luci/quickfile/api/(.*) /api/$1?host=$scheme://$host break;
proxy_pass http://unix:/tmp/run/quickfile/quickfile.sock:/api/;
}
location /cgi-bin/luci/quickfile-static/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
rewrite ^/cgi-bin/luci/quickfile-static/(.*) /static/$1?host=$scheme://$host break;
proxy_pass http://unix:/tmp/run/quickfile/quickfile.sock:/static/;
}