mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-20 02:00:05 -08:00
webrtc: fix re-establishing connection in iframe (#4721)
Some checks are pending
code_lint / golangci_lint (push) Waiting to run
code_lint / mod_tidy (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
Some checks are pending
code_lint / golangci_lint (push) Waiting to run
code_lint / mod_tidy (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
Prevent a bug in Firefox in which, when the page is loaded in an iframe and the iframe is deleted and recreated, WebRTC is unable to re-establish the connection.
This commit is contained in:
parent
cfcdab1f9e
commit
bb3cfeec6f
1 changed files with 5 additions and 1 deletions
|
|
@ -306,7 +306,11 @@ func (s *httpServer) onPage(ctx *gin.Context, pathName string, publish bool) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx.Header("Cache-Control", "max-age=3600")
|
||||
// Do not cache the HTML page.
|
||||
// This prevents a bug in Firefox in which, when the page
|
||||
// is loaded in an iframe and the iframe is deleted and recreated,
|
||||
// WebRTC is unable to re-establish the connection.
|
||||
ctx.Header("Cache-Control", "no-cache")
|
||||
ctx.Header("Content-Type", "text/html")
|
||||
ctx.Writer.WriteHeader(http.StatusOK)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue