feat(dev): add option to disable CSP (for development purposes only)

This commit is contained in:
Fijxu 2025-02-21 14:09:16 -03:00
parent 7fcee35cb1
commit d8ecfd9c04
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -62,7 +62,7 @@ module Invidious::Routes::BeforeAll
"child-src 'self' blob:",
"frame-src 'self'",
"frame-ancestors " + frame_ancestors,
}.join("; ")
}.join("; ") if CONFIG.csp
env.response.headers["Referrer-Policy"] = "same-origin"