Create a WithGlobalMiddlewares
server option to replace WithCorsMiddleware
#284
Labels
feature-request
New feature or request
good first issue
Good for newcomers
maintainance / not prio
Non user-critical change that improves the codebase
Is your feature request related to a problem? Please describe.
WithCorsMiddleware
is very specific. We need Global Middlewares.They differ from route middleware by the fact that every request pass by them, EVEN IF the request is not being routed to a handler. For example, Global Middlewares will handle
/not-existing-path
, while route middlewares will not handles them.Use
registers middlewares to routes, not globally.option.Middleware
registers middlewares to routes, not globally.Describe the solution you'd like
Replace
corsMiddleware
by a list of middlewares. Keep the example of CORS in the description.The text was updated successfully, but these errors were encountered: