TUN-7421: Add *.cloudflare.com to permitted Origins for management WebSocket requests
This commit is contained in:
parent
9426b60308
commit
c43e07d6b7
|
@ -216,7 +216,11 @@ func (m *ManagementService) parseFilters(c *websocket.Conn, event *ClientEvent,
|
||||||
|
|
||||||
// Management Streaming Logs accept handler
|
// Management Streaming Logs accept handler
|
||||||
func (m *ManagementService) logs(w http.ResponseWriter, r *http.Request) {
|
func (m *ManagementService) logs(w http.ResponseWriter, r *http.Request) {
|
||||||
c, err := websocket.Accept(w, r, nil)
|
c, err := websocket.Accept(w, r, &websocket.AcceptOptions{
|
||||||
|
OriginPatterns: []string{
|
||||||
|
"*.cloudflare.com",
|
||||||
|
},
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
m.log.Debug().Msgf("management handshake: %s", err.Error())
|
m.log.Debug().Msgf("management handshake: %s", err.Error())
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue