-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
I've tried to setup a bunch of setupRoutes params to my gateway but it seems not working at all.
After some checking , I realized that the option if not read (wondering if I did miss something)
Here is my use case:
func corsHandler(broker moleculer.BrokerContext, r *mux.Router) {
cors := handlers.CORS(
handlers.AllowedOrigins([]string{"*"}),
handlers.AllowedMethods([]string{"GET", "POST", "DELETE", "PUT", "HEAD", "OPTIONS"}),
handlers.AllowedHeaders([]string{"Content-Type", "X-Requested-With", "Authorization", "X-Workspace-ID"}),
)
// I've added a breakpoint here but nothing pass by here, neither during starting sequence or request execution
cors(r)
} service := &gateway.HttpService{
Settings: map[string]interface{}{
"port": strconv.Itoa(setting.Port),
"setupRoutes": []func(moleculer.BrokerContext, *mux.Router){
corsHandler,
injectResponseWriter,
},
},
Mixins: ...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels