aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2024-01-10 09:39:13 +0100
committerGitHub <noreply@github.com>2024-01-10 09:39:13 +0100
commite34242008b85c8a2dbd16cebb2b98c08064e226b (patch)
tree5c068437ceac3039a5811c2f0ba2bf047f95b9aa
parent57646d5b86a929469f8ada9b9168fc19e09d9f2e (diff)
Add CORP header to `/download` and `/thumbnail` (#3299)
Part of #3222 https://github.com/matrix-org/matrix-spec-proposals/pull/3828
-rw-r--r--mediaapi/routing/routing.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/mediaapi/routing/routing.go b/mediaapi/routing/routing.go
index e0af4a91..5963eeaa 100644
--- a/mediaapi/routing/routing.go
+++ b/mediaapi/routing/routing.go
@@ -123,6 +123,7 @@ func makeDownloadAPI(
// Set internal headers returned regardless of the outcome of the request
util.SetCORSHeaders(w)
+ w.Header().Set("Cross-Origin-Resource-Policy", "cross-origin")
// Content-Type will be overridden in case of returning file data, else we respond with JSON-formatted errors
w.Header().Set("Content-Type", "application/json")