goim icon indicating copy to clipboard operation
goim copied to clipboard

跨域

Open plum330 opened this issue 5 years ago • 1 comments

goim实现的websocket不支持跨域吧,如果要跨域如何解决呢?

plum330 avatar Dec 07 '20 07:12 plum330

// 自己在gin管道中配置下这个 // 跨域配置 func cors(c gin.Context) { c.Header("Access-Control-Allow-Origin", "") // header的类型 c.Header("Access-Control-Allow-Headers", "*") }

mrh520 avatar Jan 12 '21 06:01 mrh520