fix: invidious
This commit is contained in:
parent
39f4460e0a
commit
8747f887f8
1 changed files with 19 additions and 0 deletions
|
|
@ -52,6 +52,10 @@ with lib;
|
||||||
default_home = "Popular";
|
default_home = "Popular";
|
||||||
feed_menu = [ "Popular" "Trending" "Subscriptions" ];
|
feed_menu = [ "Popular" "Trending" "Subscriptions" ];
|
||||||
|
|
||||||
|
# HTTPS configuration for proper URL generation
|
||||||
|
external_port = mkForce 443;
|
||||||
|
https_only = mkForce true;
|
||||||
|
|
||||||
# YouTube compatibility settings
|
# YouTube compatibility settings
|
||||||
use_quic = true;
|
use_quic = true;
|
||||||
force_resolve = "ipv4";
|
force_resolve = "ipv4";
|
||||||
|
|
@ -190,6 +194,21 @@ EOF
|
||||||
proxy_hide_header Cache-Control;
|
proxy_hide_header Cache-Control;
|
||||||
proxy_hide_header etag;
|
proxy_hide_header etag;
|
||||||
proxy_hide_header "alt-svc";
|
proxy_hide_header "alt-svc";
|
||||||
|
proxy_hide_header Access-Control-Allow-Origin;
|
||||||
|
proxy_hide_header Access-Control-Allow-Methods;
|
||||||
|
proxy_hide_header Access-Control-Allow-Headers;
|
||||||
|
proxy_hide_header Access-Control-Expose-Headers;
|
||||||
|
|
||||||
|
# CORS headers for iOS clients like Yattee
|
||||||
|
add_header Access-Control-Allow-Origin * always;
|
||||||
|
add_header Access-Control-Allow-Methods "GET, HEAD, OPTIONS" always;
|
||||||
|
add_header Access-Control-Allow-Headers "Range, Content-Type" always;
|
||||||
|
add_header Access-Control-Expose-Headers "Content-Length, Content-Range" always;
|
||||||
|
|
||||||
|
# Handle preflight requests
|
||||||
|
if ($request_method = OPTIONS) {
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
|
||||||
# Optimize for large file transfers
|
# Optimize for large file transfers
|
||||||
sendfile on;
|
sendfile on;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue