Add CORP header to /download and /thumbnail (#3299)

Part of #3222 

https://github.com/matrix-org/matrix-spec-proposals/pull/3828
This commit is contained in:
Till 2024-01-10 09:39:13 +01:00 committed by GitHub
parent 57646d5b86
commit e34242008b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,6 +123,7 @@ func makeDownloadAPI(
// Set internal headers returned regardless of the outcome of the request // Set internal headers returned regardless of the outcome of the request
util.SetCORSHeaders(w) 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 // 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") w.Header().Set("Content-Type", "application/json")