Skip to content

Commit

Permalink
General commit
Browse files Browse the repository at this point in the history
  • Loading branch information
atul24112001 committed Nov 6, 2024
1 parent 8132920 commit fbd0c91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
return r.Header.Get("origin") == os.Getenv("FRONTEND_URL")
origin := r.Header.Get("origin")
log.Println("Origin", origin)
return origin == os.Getenv("FRONTEND_URL")
},
}

Expand Down

0 comments on commit fbd0c91

Please sign in to comment.