From 344bc2d8e950748ab0c5f68f4c18d12e45b9c281 Mon Sep 17 00:00:00 2001 From: Fijxu Date: Fri, 16 Jan 2026 19:39:44 -0300 Subject: [PATCH] Strip unwanted headers from response headers in images and videoplayback (#5595) Image responses contained the following unwanted headers that should not be passed to the clients: ``` "Cross-Origin-Resource-Policy" ["cross-origin"] "Cross-Origin-Opener-Policy-Report-Only" ["same-origin; report-to=\"youtube\""] "Report-To" ["{\"group\":\"youtube\",\"max_age\":2592000,\"endpoints\":[{\"url\":\"https://csp.withgoogle.com/csp/report-to/youtube\"}]}"] "Timing-Allow-Origin" ["*"] ``` --- src/invidious.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index a61f91a9..ec518453 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -78,7 +78,7 @@ TEST_IDS = {"AgbeGFYluEA", "BaW_jenozKc", "a9LDPn-MO4I", "ddFvjfvPnqk" MAX_ITEMS_PER_PAGE = 1500 REQUEST_HEADERS_WHITELIST = {"accept", "accept-encoding", "cache-control", "content-length", "if-none-match", "range"} -RESPONSE_HEADERS_BLACKLIST = {"access-control-allow-origin", "alt-svc", "server"} +RESPONSE_HEADERS_BLACKLIST = {"access-control-allow-origin", "alt-svc", "server", "cross-origin-opener-policy-report-only", "report-to", "cross-origin", "timing-allow-origin", "cross-origin-resource-policy"} HTTP_CHUNK_SIZE = 10485760 # ~10MB CURRENT_BRANCH = {{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}