mirror of
https://github.com/originalmk/archat-server.git
synced 2025-01-18 08:19:17 +00:00
Accept all origins to allow client to connect
This commit is contained in:
parent
15babe60d1
commit
fff246214c
@ -558,7 +558,11 @@ func testEcho(hdlCtx *HandlerContext) {
|
||||
}
|
||||
|
||||
func (ctx *Context) wsapiHandler(w http.ResponseWriter, r *http.Request) {
|
||||
upgrader := websocket.Upgrader{}
|
||||
upgrader := websocket.Upgrader{
|
||||
CheckOrigin: func(r *http.Request) bool {
|
||||
return true // Allow all origins
|
||||
},
|
||||
}
|
||||
conn, err := upgrader.Upgrade(w, r, nil)
|
||||
|
||||
if err != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user