mirror of
https://github.com/YunoHost-Apps/piped_ynh.git
synced 2024-09-03 20:05:54 +02:00
63 lines
1.6 KiB
Nginx Configuration File
63 lines
1.6 KiB
Nginx Configuration File
#rewrite ^__PATH__$ __PATH__/ permanent;
|
|
|
|
location __PATH__/api/ {
|
|
|
|
# Path to source
|
|
#proxy_cache pipedapi;
|
|
proxy_pass http://127.0.0.1:__PORT__/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection "keep-alive";
|
|
}
|
|
|
|
location ~ (__PATH__/proxy/videoplayback|__PATH__/proxy/api/v4/|__PATH__/proxy/api/manifest/) {
|
|
rewrite ^/proxy/(.*) /$1 break;
|
|
proxy_buffering on;
|
|
proxy_buffers 1024 16k;
|
|
proxy_set_header X-Forwarded-For "";
|
|
proxy_set_header CF-Connecting-IP "";
|
|
proxy_hide_header "alt-svc";
|
|
sendfile on;
|
|
sendfile_max_chunk 512k;
|
|
tcp_nopush on;
|
|
aio threads=default;
|
|
aio_write on;
|
|
directio 16m;
|
|
proxy_hide_header Cache-Control;
|
|
proxy_hide_header etag;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection keep-alive;
|
|
proxy_max_temp_file_size 32m;
|
|
access_log off;
|
|
proxy_pass http://127.0.0.1:__PORT_PROXY__;
|
|
more_set_headers "Cache-Control: private always";
|
|
}
|
|
|
|
location __PATH__/proxy/ {
|
|
proxy_buffering on;
|
|
proxy_buffers 1024 16k;
|
|
proxy_set_header X-Forwarded-For "";
|
|
proxy_set_header CF-Connecting-IP "";
|
|
proxy_hide_header "alt-svc";
|
|
sendfile on;
|
|
sendfile_max_chunk 512k;
|
|
tcp_nopush on;
|
|
aio threads=default;
|
|
aio_write on;
|
|
directio 16m;
|
|
proxy_hide_header Cache-Control;
|
|
proxy_hide_header etag;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Connection keep-alive;
|
|
proxy_max_temp_file_size 32m;
|
|
access_log off;
|
|
proxy_pass http://127.0.0.1:__PORT_PROXY__/;
|
|
more_set_headers "Cache-Control: 'public, max-age=604800'";
|
|
}
|
|
|
|
|
|
location __PATH__/ {
|
|
|
|
# Path to source
|
|
alias __INSTALL_DIR__/dist/;
|
|
try_files $uri $uri/ /index.html;
|
|
}
|