fix
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 3m25s
All checks were successful
Create and publish a Docker image 🚀 / build-and-push-image (push) Successful in 3m25s
This commit is contained in:
@@ -8,15 +8,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (h *Hub) ws(w http.ResponseWriter, r *http.Request) {
|
func (h *Hub) ws(w http.ResponseWriter, r *http.Request) {
|
||||||
w.Header().Set("Access-Control-Allow-Origin", "*")
|
|
||||||
w.Header().Set("Access-Control-Allow-Methods", "GET, OPTIONS")
|
|
||||||
w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization")
|
|
||||||
|
|
||||||
if r.Method == "OPTIONS" {
|
|
||||||
w.WriteHeader(http.StatusOK)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
upgrader := websocket.Upgrader{
|
upgrader := websocket.Upgrader{
|
||||||
CheckOrigin: func(r *http.Request) bool { return true },
|
CheckOrigin: func(r *http.Request) bool { return true },
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user