Conversation
Added frontend hosts values
Created configuration class with CORS setup
Qodana Community for JVMIt seems all right 👌 No new problems were found according to the checks applied ☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Updated list of request headers
There was a problem hiding this comment.
Pull Request Overview
This PR implements CORS (Cross-Origin Resource Sharing) configuration to fix CORS policy issues. It adds frontend host configuration and creates a dedicated CORS configuration class to allow cross-origin requests from specified frontend origins.
- Adds frontend host configuration to application.yaml for local and production environments
- Creates CorsConfig class with proper CORS policy configuration including allowed origins, methods, headers, and credentials
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/main/resources/application.yaml | Adds frontend host configuration for local and production environments |
| src/main/kotlin/org/careerseekers/apientrypoint/config/CorsConfig.kt | Creates CORS configuration bean with allowed origins, methods, headers, and credentials support |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| addAllowedOrigin(frontendLocalHost) | ||
| addAllowedOrigin(frontendProductionHost) |
There was a problem hiding this comment.
Using addAllowedOrigin() with dynamic origins can be a security risk if the environment variables contain wildcard values like '*'. Consider using addAllowedOriginPattern() for better control or validate that the origins are specific URLs.
| addAllowedOrigin(frontendLocalHost) | |
| addAllowedOrigin(frontendProductionHost) | |
| addAllowedOriginPattern(frontendLocalHost) | |
| addAllowedOriginPattern(frontendProductionHost) |
Closes #1