Skip to content

Commit

Permalink
Merge pull request #9 from bluesky-social/websocket_upgrader_cors
Browse files Browse the repository at this point in the history
Explicitly allow all origins in websocket upgrader
  • Loading branch information
ericvolp12 authored Oct 20, 2024
2 parents dcd4334 + a003f34 commit 39f24fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ type Server struct {
seq int64
}

var upgrader = websocket.Upgrader{}
var upgrader = websocket.Upgrader{
// Allow all origins in websocket upgrade requests
CheckOrigin: func(r *http.Request) bool {
return true
},
}
var maxConcurrentEmits = int64(100)
var cutoverThresholdUS = int64(1_000_000)
var tracer = otel.Tracer("jetstream-server")
Expand Down

0 comments on commit 39f24fb

Please sign in to comment.