Piped-Docker/template/Caddyfile
2021-11-07 20:40:25 +00:00

76 lines
1.4 KiB
Caddyfile

{
servers :443 {
protocol {
experimental_http3
}
}
}
FRONTEND_HOSTNAME {
reverse_proxy pipedfrontend:80
header {
# disable FLoC tracking
Permissions-Policy interest-cohort=()
# enable HSTS
Strict-Transport-Security max-age=31536000;
# keep referrer data off
Referrer-Policy no-referrer
# prevent for appearing in search engine for private instances (option)
#X-Robots-Tag noindex
}
}
BACKEND_HOSTNAME {
reverse_proxy varnish:80
header {
# disable FLoC tracking
Permissions-Policy interest-cohort=()
# enable HSTS
Strict-Transport-Security max-age=31536000;
# keep referrer data off
Referrer-Policy no-referrer
# prevent for appearing in search engine for private instances (option)
#X-Robots-Tag noindex
}
}
PROXY_HOSTNAME {
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
header {
# disable FLoC tracking
Permissions-Policy interest-cohort=()
# enable HSTS
Strict-Transport-Security max-age=31536000;
# keep referrer data off
Referrer-Policy no-referrer
# prevent for appearing in search engine for private instances (option)
#X-Robots-Tag noindex
}
route {
header @ytproxy {
Cache-Control private always
}
header / {
Cache-Control "public, max-age=604800"
}
reverse_proxy unix//var/run/ytproxy/http-proxy.sock {
header_up -CF-Connecting-IP
header_up -X-Forwarded-For
header_down -etag
header_down -alt-svc
}
}
}