Skip to content

Commit

Permalink
fix: sample program indentation (#2840)
Browse files Browse the repository at this point in the history
  • Loading branch information
taako-502 committed Nov 7, 2023
1 parent 132ec1c commit dcb7619
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/content/recipes/cors.md
Expand Up @@ -38,17 +38,17 @@ func main() {
}).Handler)


srv := handler.NewDefaultServer(starwars.NewExecutableSchema(starwars.NewResolver()))
srv.AddTransport(&transport.Websocket{
Upgrader: websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
// Check against your desired domains here
return r.Host == "example.org"
},
ReadBufferSize: 1024,
WriteBufferSize: 1024,
},
})
srv := handler.NewDefaultServer(starwars.NewExecutableSchema(starwars.NewResolver()))
srv.AddTransport(&transport.Websocket{
Upgrader: websocket.Upgrader{
CheckOrigin: func(r *http.Request) bool {
// Check against your desired domains here
return r.Host == "example.org"
},
ReadBufferSize: 1024,
WriteBufferSize: 1024,
},
})

router.Handle("/", playground.Handler("Starwars", "/query"))
router.Handle("/query", srv)
Expand Down

0 comments on commit dcb7619

Please sign in to comment.