Skip to content

Commit

Permalink
true full cors unlock
Browse files Browse the repository at this point in the history
don't ask me why but this is needed to truly completely unblock cors
  • Loading branch information
mcmonkey4eva committed Sep 5, 2024
1 parent 318b5d3 commit b2e6e2b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ func (s *Server) Start() error {
e.HideBanner = true
e.Use(drip_middleware.TracingMiddleware)
e.Use(middleware.CORSWithConfig(middleware.CORSConfig{
AllowOrigins: []string{"*"}, // This allows all origins
AllowMethods: []string{"*"},
AllowHeaders: []string{"*"},
AllowOrigins: []string{"*"}, // This allows all origins
AllowMethods: []string{"*"},
AllowHeaders: []string{"*"},
AllowOriginFunc: func(origin string) (bool, error) {
return true, nil
},
AllowCredentials: true,
}))
e.Use(middleware.RequestLoggerWithConfig(middleware.RequestLoggerConfig{
Expand Down

0 comments on commit b2e6e2b

Please sign in to comment.