We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setupRoutes
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: ...
The text was updated successfully, but these errors were encountered:
@malaDev any chance you can provide the full use case? Or an example app on a repository?
Sorry, something went wrong.
the code I provided above is quite explicit I think you can place breakpoint inside of it, you will notice the runtime will not pass by
anyway, I will prepare a PR for this
No branches or pull requests
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:
The text was updated successfully, but these errors were encountered: