diff --git a/README.md b/README.md index 1ea4873..3f3629a 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,9 @@ This project is licensed under the **MIT License**. See the [LICENSE](./LICENSE) For questions, suggestions, or collaboration: -- GitHub Issues: [Submit here](https://github.com/PKTTTeam/PKWMTT-backend/issues) -- Team: [@PKTTTeam](https://github.com/PKTTTeam) +- GitHub Issues: [Submit here](https://github.com/PKWMApp/PKWMTT-backend/issues) +- Team: [@PKWMApp](https://github.com/PKWMApp + ) --- diff --git a/src/main/java/org/pkwmtt/security/cors/SecurityCorsConfig.java b/src/main/java/org/pkwmtt/security/cors/SecurityCorsConfig.java index 5107d21..7e7370f 100644 --- a/src/main/java/org/pkwmtt/security/cors/SecurityCorsConfig.java +++ b/src/main/java/org/pkwmtt/security/cors/SecurityCorsConfig.java @@ -15,22 +15,22 @@ */ @Configuration public class SecurityCorsConfig { - + /** * @return UrlBasedCorsConfigurationSource with CORS configuration for spring security * added to SecurityFilterChain by .cors(withDefaults()) */ @Bean - CorsConfigurationSource corsConfigurationSource() { + CorsConfigurationSource corsConfigurationSource () { CorsConfiguration config = new CorsConfiguration(); - config.setAllowedOrigins(List.of("https://pkwmapp.pl")); + config.setAllowedOrigins(List.of("https://pkwmapp.pl", "http://localhost:3000")); config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "OPTIONS")); config.setAllowedHeaders(List.of("*")); config.setAllowCredentials(true); //??? - + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); source.registerCorsConfiguration("/pkmwtt/api/**", config); - + return source; } }