Skip to content

Commit

Permalink
feat: allowed localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
akwanmaroso committed Jan 11, 2025
1 parent 1edcedd commit b7c935c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/serve_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ var serveHttpCmd = &cobra.Command{

// route
router := registerHandler(app)
// router.Use(cors.Default().Handler)

// build cors
muxCorsWithRouter := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedOrigins: []string{"*", "http://localhost:8000"},
AllowedMethods: []string{"*"},
AllowedHeaders: []string{"*"},
}).Handler(router)
Expand Down

0 comments on commit b7c935c

Please sign in to comment.