Piped-Docker/template/Caddyfile

48 lines
826 B
Caddyfile
Raw Normal View History

2022-09-21 17:07:01 +00:00
(global) {
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
}
}
2022-09-21 17:07:01 +00:00
FRONTEND_HOSTNAME {
reverse_proxy pipedfrontend:80
import global
}
BACKEND_HOSTNAME {
2022-11-03 17:40:46 +00:00
reverse_proxy nginx:80
2022-09-21 17:07:01 +00:00
import global
}
PROXY_HOSTNAME {
@ytproxy path /videoplayback* /api/v4/* /api/manifest/*
2022-09-21 17:07:01 +00:00
import global
route {
header @ytproxy {
Cache-Control private always
}
header / {
Cache-Control "public, max-age=604800"
}
2022-11-03 17:28:09 +00:00
reverse_proxy unix//var/run/ytproxy/actix.sock {
header_up -CF-Connecting-IP
header_up -X-Forwarded-For
header_down -etag
header_down -alt-svc
}
}
}