Allow iframe embedding for APlayer share pages

Sets the X-Frame-Options header to ALLOWALL in handleAPlayer to permit embedding APlayer share pages in iframes.
This commit is contained in:
Sora 2026-01-20 11:18:29 +08:00
parent 301a3e2e03
commit 426d28d7bc

View File

@ -197,6 +197,9 @@ func (pub *Router) handleAPlayer(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Error rendering page", http.StatusInternalServerError)
return
}
// Allow embedding in iframes for APlayer share pages
w.Header().Set("X-Frame-Options", "ALLOWALL")
w.Header().Set("Content-Type", "text/html; charset=utf-8")
_, _ = w.Write(buf.Bytes())
}