fix: invidious
This commit is contained in:
@@ -52,6 +52,10 @@ with lib;
|
||||
default_home = "Popular";
|
||||
feed_menu = [ "Popular" "Trending" "Subscriptions" ];
|
||||
|
||||
# HTTPS configuration for proper URL generation
|
||||
external_port = mkForce 443;
|
||||
https_only = mkForce true;
|
||||
|
||||
# YouTube compatibility settings
|
||||
use_quic = true;
|
||||
force_resolve = "ipv4";
|
||||
@@ -190,6 +194,21 @@ EOF
|
||||
proxy_hide_header Cache-Control;
|
||||
proxy_hide_header etag;
|
||||
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
|
||||
sendfile on;
|
||||
|
||||
Reference in New Issue
Block a user