From 4d03b035d798098ba77770f461c1f40b087234fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Florczak?= <84631301+florczaq@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:39:03 +0200 Subject: [PATCH 1/3] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1ea4873..d5dfc68 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: [@PKTTTeam](https://github.com/PKWMApp + ) --- From 2ac78098fc02128a5508d5f12c21eb0ff71ddf97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Florczak?= <84631301+florczaq@users.noreply.github.com> Date: Wed, 24 Sep 2025 15:39:26 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5dfc68..3f3629a 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ This project is licensed under the **MIT License**. See the [LICENSE](./LICENSE) For questions, suggestions, or collaboration: - GitHub Issues: [Submit here](https://github.com/PKWMApp/PKWMTT-backend/issues) -- Team: [@PKTTTeam](https://github.com/PKWMApp +- Team: [@PKWMApp](https://github.com/PKWMApp ) --- From b04218f576d5d22f3962e339f1a67f498c77b619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miko=C5=82aj=20Florczak?= <84631301+florczaq@users.noreply.github.com> Date: Wed, 24 Sep 2025 17:41:07 +0200 Subject: [PATCH 3/3] Add localhost to host --- .../org/pkwmtt/security/cors/SecurityCorsConfig.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; } }