-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
How to mount Express middleware #2061
Comments
I really would like to know how to add middleware. I can't figure it out. |
Closing as a duplicate of #1293 (see also #2035 and #1982) BTW, CORS middleware is automatically enabled by LB4, see https://loopback.io/doc/en/lb4/Server.html#customize-cors In general, we are trying to move away from Express middleware and use the concept of a Sequence of actions and Dependency Injection to drive the request processing flow. Could you please be more specific about "Headers" scenario you mentioned in the issue description? What are you trying to achieve? For example, to access a specific request header from your controller method, I would recommend to define a |
I wrote a component that lets you register express middleware in the sequence. |
Hi, I need a Middleware example to all routes of my app.
Example: Verify CORS, Headers,etc.
I would greatly appreciate your help.
The text was updated successfully, but these errors were encountered: