Refactoring Issue
The code snippet below needs refactoring for cleaner and more maintainable handling of allowed origins and HTTP methods:
Problem
ALLOWED_ORIGINS and ALLOWED_METHODS are currently hardcoded as static fields.
- This approach limits flexibility and makes configuration changes harder.
Suggested Improvements
- Move these values to application.properties
- Make the handling of allowed origins and methods more dynamic to support future changes.
Refactoring Issue
The code snippet below needs refactoring for cleaner and more maintainable handling of allowed origins and HTTP methods:
Problem
ALLOWED_ORIGINSandALLOWED_METHODSare currently hardcoded as static fields.Suggested Improvements