[SEN] 修复实时监看按需拉流循环等待 (#54) #55

Open
ila wants to merge 34 commits from agent/codex/54-sense-liveview-on-demand into agent/codex/51-sense-auto-liveview
Showing only changes of commit aed36eab99 - Show all commits
+6 -1
View File
@@ -61,6 +61,11 @@ func (m *Module) player(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Cache-Control", "no-store")
w.Header().Set("Content-Security-Policy", "default-src 'none'; frame-src http: https:; style-src 'unsafe-inline'")
// This endpoint is the authenticated, same-origin wrapper loaded by the
// live-view page. Keep the global DENY policy everywhere else, and allow
// only Sense itself to embed this wrapper.
w.Header().Set("X-Frame-Options", "SAMEORIGIN")
w.Header().Set("Content-Security-Policy", "default-src 'none'; frame-ancestors 'self'; frame-src http: https:; style-src 'unsafe-inline'")
_ = playerTemplate.Execute(w, target)
}