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

Create a WithGlobalMiddlewares server option to replace WithCorsMiddleware #284

Open
EwenQuim opened this issue Dec 18, 2024 · 3 comments
Open
Assignees
Labels
feature-request New feature or request good first issue Good for newcomers maintainance / not prio Non user-critical change that improves the codebase

Comments

@EwenQuim
Copy link
Member

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.

@EwenQuim EwenQuim added feature-request New feature or request good first issue Good for newcomers maintainance / not prio Non user-critical change that improves the codebase labels Dec 18, 2024
@ekumamatthew
Copy link

I’d like to work on this.

@EwenQuim
Copy link
Member Author

No problem, happy to hear that :)

@jwtly10
Copy link
Contributor

jwtly10 commented Dec 30, 2024

Hi @ekumamatthew

Are you working on this one? If not I am happy to have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request good first issue Good for newcomers maintainance / not prio Non user-critical change that improves the codebase
Projects
None yet
Development

No branches or pull requests

3 participants