We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 860e48a + 647d347 commit 37c574aCopy full SHA for 37c574a
cmd/serve_http.go
@@ -60,7 +60,12 @@ var serveHttpCmd = &cobra.Command{
60
router := registerHandler(app)
61
62
// build cors
63
- muxCorsWithRouter := cors.AllowAll().Handler(router)
+ muxCorsWithRouter := cors.New(cors.Options{
64
+ AllowedOrigins: cfg.CORS_ALLOWED_ORIGINS,
65
+ AllowedHeaders: cfg.CORS_ALLOWED_HEADERS,
66
+ AllowedMethods: cfg.CORS_ALLOWED_METHODS,
67
+ AllowCredentials: true,
68
+ }).Handler(router)
69
70
srv := &http.Server{
71
Addr: cfg.APP_PORT,
0 commit comments