-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
87 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,88 @@ | ||
piped.aosus.org { | ||
redir https://piped.aosus.link{uri} 301 | ||
header Cache-Control "max-age=2592000, stale-while-revalidate=2592000" | ||
} | ||
redir https://piped.aosus.link{uri} 301 | ||
header Cache-Control "max-age=2592000, stale-while-revalidate=2592000" | ||
} | ||
|
||
(piped-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 | ||
} | ||
} | ||
|
||
piped.aosus.link { | ||
# aosus settings | ||
respond /robots.txt 200 { | ||
body "User-agent: * | ||
Disallow: /" | ||
} | ||
handle_errors { | ||
# handle_errors is only triggerd on erros from Caddy and not the proxy, that's why we don't specifiy any errors here. | ||
rewrite * /proxy_error_page.html | ||
file_server { | ||
root /srv/ | ||
} | ||
} | ||
header { | ||
X-Robots-Tag "noindex, noarchive, nofollow, nosnippet" | ||
X-XSS-Protection "1; mode=block" | ||
} | ||
# end aosus settings | ||
reverse_proxy pipedfrontend:80 | ||
import piped-global | ||
encode zstd gzip | ||
} | ||
|
||
api.piped.aosus.link { | ||
# aosus settings | ||
respond /robots.txt 200 { | ||
body "User-agent: * | ||
Disallow: /" | ||
} | ||
header { | ||
X-Robots-Tag "noindex, noarchive, nofollow, nosnippet" | ||
X-XSS-Protection "1; mode=block" | ||
} | ||
# end aosus settings | ||
reverse_proxy piped-nginx:80 | ||
import piped-global | ||
encode zstd gzip | ||
} | ||
|
||
proxy.piped.aosus.link { | ||
@ytproxy path /videoplayback* /api/v4/* /api/manifest/* | ||
import piped-global | ||
# aosus settings | ||
respond /robots.txt 200 { | ||
body "User-agent: * | ||
Disallow: /" | ||
} | ||
header { | ||
X-Robots-Tag "noindex, noarchive, nofollow, nosnippet" | ||
X-XSS-Protection "1; mode=block" | ||
} | ||
# end aosus settings | ||
route { | ||
header @ytproxy { | ||
Cache-Control private always | ||
} | ||
|
||
header / { | ||
Cache-Control "public, max-age=604800" | ||
} | ||
|
||
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 | ||
} | ||
} | ||
encode zstd gzip | ||
} |