Skip to content

Commit ad35efd

Browse files
committed
fix: use config
1 parent 3bb024a commit ad35efd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/serve_http.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ var serveHttpCmd = &cobra.Command{
4040

4141
// build cors
4242
muxCorsWithRouter := muxHandlers.CORS(
43-
// muxHandlers.AllowCredentials(),
44-
muxHandlers.AllowedHeaders([]string{"*"}),
45-
muxHandlers.AllowedMethods([]string{"*"}),
46-
muxHandlers.AllowedOrigins([]string{"*"}),
43+
muxHandlers.AllowedHeaders(cfg.CORS_ALLOWED_HEADERS),
44+
muxHandlers.AllowedMethods(cfg.CORS_ALLOWED_METHODS),
45+
muxHandlers.AllowedOrigins(cfg.CORS_ALLOWED_ORIGINS),
46+
muxHandlers.AllowCredentials(),
4747
)(router)
4848

4949
srv := &http.Server{

0 commit comments

Comments
 (0)