Skip to content

Commit

Permalink
fix: allow all origin
Browse files Browse the repository at this point in the history
  • Loading branch information
harisheoran committed Dec 2, 2024
1 parent 6a0e91f commit f604aab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Binary file modified chat-server/bin/api
Binary file not shown.
4 changes: 4 additions & 0 deletions chat-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ var (
upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
// Allow all origins (not secure, only for testing)
return true
},
}

ctx = context.Background()
Expand Down

0 comments on commit f604aab

Please sign in to comment.