Fix: Remove X-Frame-Options header from Collabora proxy to allow iframe loading
- The collaboraProxyHandler endpoint is intentionally meant to load in an iframe - X-Frame-Options: SAMEORIGIN was blocking cross-origin iframe loads - Removed the header to allow the Flutter web frontend to embed the proxy page
This commit is contained in:
@@ -689,7 +689,7 @@ func collaboraProxyHandler(w http.ResponseWriter, r *http.Request, db *database.
|
|||||||
</html>`, collaboraURL, wopiSrc)
|
</html>`, collaboraURL, wopiSrc)
|
||||||
|
|
||||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
|
// Don't set X-Frame-Options - this endpoint is meant to be loaded in an iframe
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusOK)
|
||||||
w.Write([]byte(htmlContent))
|
w.Write([]byte(htmlContent))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user