mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Added access control header *
Former-commit-id: a426e27bcbc533a15c2a2b0459ed799fadc2a787 [formerly 800b5f52810f6ef875f96c754cb42185a50badc0] [formerly 01b72cb3f3ae23f101d6a6d8273b9b426ce0b7da [formerly 8c406982f3
]]
Former-commit-id: 95422abadd277c5c5b06257ff15ea35b1fc46740 [formerly 3a2861c4f90c1aa0794840f44af0a1c1a6ecfb49]
Former-commit-id: 7cce559cf40c44ea3695eba5ec9f8c8a2ef4376a
This commit is contained in:
parent
46b3b7b5a0
commit
bbb33c1f72
@ -15,6 +15,7 @@ var wsupgrader = websocket.Upgrader{
|
||||
}
|
||||
|
||||
func wshandler(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
||||
conn, err := wsupgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
fmt.Println("Failed to set websocket upgrade: %+v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user