Skip to content
New issue

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

Use middleware on GroupedEffects created with combineRoutes() #36

couzic opened this issue May 29, 2018 · 3 comments


2 participants
Copy link

commented May 29, 2018

In my development environment, I'm adding CORS headers to my API responses. But my API endpoints are combined :
combineRoutes('/api', effects)

I would like a way to use my CORS middleware on all API effects, without having to call use() on each of them. I was thinking of something similar to httpListener's signature :
combineRoutes('/api', { middlewares, effects })


This comment has been minimized.

Copy link

commented May 29, 2018

Definately - that something that we have in mind and defined for future releases. So your request validated my thoughts 👍

But I'm thinking about the following API:

  path: string,
  effects: Effect[],
  middlewares: Effect<HttpRequest>[],

In order to not introduce breaking changes. But I'm open for discussion 😄

@JozefFlakus JozefFlakus added this to the v0.4.0 milestone May 29, 2018

@JozefFlakus JozefFlakus added this to To do in Roadmap to 1.0.0 via automation May 29, 2018

@JozefFlakus JozefFlakus modified the milestones: v0.4.0, v0.5.0 May 30, 2018


This comment has been minimized.

Copy link

commented May 31, 2018

No strong opinions here, whatever works for you.


This comment has been minimized.

Copy link

commented Jun 13, 2018

@couzic version 0.5.0 has been released. See latest changelog. Also you can check PR #47 for more details. Cheers! 💪

BTW. Updated documentation for new changes is on the way.

Roadmap to 1.0.0 automation moved this from In progress to Done Jun 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.