Add CORS expose headers for PDF viewer compatibility

This commit is contained in:
Leon Bösche
2026-01-10 19:16:23 +01:00
parent 54fa429e3e
commit 288363d2da
2 changed files with 4 additions and 3 deletions

View File

@@ -43,6 +43,7 @@ func CORS(allowedOrigins string) func(http.Handler) http.Handler {
}
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, PATCH, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
w.Header().Set("Access-Control-Expose-Headers", "Content-Length, Content-Type, Content-Disposition")
w.Header().Set("Access-Control-Max-Age", "3600")
if r.Method == http.MethodOptions {