65 lines
1.3 KiB
Plaintext
65 lines
1.3 KiB
Plaintext
location @upstream {
|
|
proxy_pass http://inv;
|
|
include configs/proxy.conf;
|
|
limit_rate 1000k;
|
|
# Disable buffering and cache so i don't kill my
|
|
# SSD and bandwidth usage
|
|
proxy_buffering off;
|
|
proxy_request_buffering off;
|
|
proxy_cache off;
|
|
proxy_intercept_errors on;
|
|
error_page 502 = @fallback;
|
|
}
|
|
|
|
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
|
|
# Woops! Sorry. I don't want to kill my SSD lol!
|
|
proxy_buffering off;
|
|
#proxy_buffers 1024 16k;
|
|
proxy_set_header X-Forwarded-For "";
|
|
proxy_hide_header "alt-svc";
|
|
sendfile_max_chunk 512k;
|
|
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;
|
|
proxy_pass http://http3-ytproxy;
|
|
add_header Cache-Control private always;
|
|
limit_rate 6000k;
|
|
|
|
}
|
|
|
|
location / {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /search {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1 {
|
|
limit_req zone=invidious-apirl nodelay burst=10;
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/storyboards {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/captions {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location /api/v1/comments {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location ~ ^/api/v1/channels/(.+)/shorts {
|
|
try_files $uri @upstream;
|
|
}
|
|
|
|
location @fallback {
|
|
root /etc/nginx/errors;
|
|
try_files $uri /502.html = 502;
|
|
}
|