Simply nginx and caddy config. (#9)

This commit is contained in:
Kavin 2021-11-07 20:40:25 +00:00 committed by GitHub
parent e1acda33ac
commit 95e20fa87d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 17 deletions

View file

@ -43,14 +43,7 @@ BACKEND_HOSTNAME {
PROXY_HOSTNAME {
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
@optionscall {
method OPTIONS
}
header {
Access-Control-Allow-Origin *
Access-Control-Allow-Headers *
# disable FLoC tracking
Permissions-Policy interest-cohort=()
@ -73,12 +66,9 @@ PROXY_HOSTNAME {
Cache-Control "public, max-age=604800"
}
respond @optionscall 200
reverse_proxy unix//var/run/ytproxy/http-proxy.sock {
header_up -CF-Connecting-IP
header_up -X-Forwarded-For
header_down -Access-Control-Allow-Origin
header_down -etag
header_down -alt-svc
}

View file

@ -5,12 +5,10 @@ server {
location ~ (/videoplayback|/api/v4/|/api/manifest/) {
include snippets/ytproxy.conf;
add_header Cache-Control private always;
proxy_hide_header Access-Control-Allow-Origin;
}
location / {
include snippets/ytproxy.conf;
add_header Cache-Control "public, max-age=604800";
proxy_hide_header Access-Control-Allow-Origin;
}
}

View file

@ -1,8 +1,3 @@
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers *;
if ($request_method = OPTIONS ) {
return 200;
}
proxy_buffering on;
proxy_buffers 1024 16k;
proxy_set_header X-Forwarded-For "";