Skip to content

Commit

Permalink
fix: use config
Browse files Browse the repository at this point in the history
  • Loading branch information
akwanmaroso committed Jan 10, 2025
1 parent 3bb024a commit ad35efd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/serve_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ var serveHttpCmd = &cobra.Command{

// build cors
muxCorsWithRouter := muxHandlers.CORS(
// muxHandlers.AllowCredentials(),
muxHandlers.AllowedHeaders([]string{"*"}),
muxHandlers.AllowedMethods([]string{"*"}),
muxHandlers.AllowedOrigins([]string{"*"}),
muxHandlers.AllowedHeaders(cfg.CORS_ALLOWED_HEADERS),
muxHandlers.AllowedMethods(cfg.CORS_ALLOWED_METHODS),
muxHandlers.AllowedOrigins(cfg.CORS_ALLOWED_ORIGINS),
muxHandlers.AllowCredentials(),
)(router)

srv := &http.Server{
Expand Down

0 comments on commit ad35efd

Please sign in to comment.