-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
What area is this about?
Security
What's your idea?
I think it would be great if @EnableJwtAuth could optionally support basic or customizable CORS configuration. Currently, the framework does not include any CORS support, which makes it unclear how to handle cross-origin requests.
This feature could allow developers to either:
- Enable default CORS settings automatically when using @EnableJwtAuth, or
- Customize CORS behavior via additional properties or annotations,
- Or continue to define CORS configurations manually if needed.
Why would this be useful?
CORS is an essential part of modern web security, especially when frontend and backend are hosted on different origins. Most applications using JWT authentication will also need CORS configuration.
Adding built-in CORS support would:
- Simplify the developer experience
- Reduce boilerplate configuration
- Prevent common mistakes that lead to CORS errors
- Align the framework more closely with production-ready web app requirements
- It also keeps flexibility by allowing developers to override or extend default behavior if needed
Code example (optional)
Can you help? (optional)
- I'd like to implement this myself
- I can help with testing
- I can help with documentation