mirror of
https://github.com/originalmk/archat-server.git
synced 2024-11-20 09:38:50 +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) {
|
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)
|
conn, err := upgrader.Upgrade(w, r, nil)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user