From 6ad72b290ec6d1ba6f27c5a1ee624513b6afc67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20K=C3=BC=C3=A7=C3=BCk?= <44123646+mustafakucuk-dev@users.noreply.github.com> Date: Tue, 26 Dec 2023 05:42:37 +0300 Subject: [PATCH] cors fix --- .../group6/annotationservice/AnnotationServiceApplication.kt | 2 +- .../main/kotlin/com/gamelounge/backend/BackendApplication.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/annotation-service/src/main/kotlin/com/group6/annotationservice/AnnotationServiceApplication.kt b/app/annotation-service/src/main/kotlin/com/group6/annotationservice/AnnotationServiceApplication.kt index 17dc1cb5..1589e081 100644 --- a/app/annotation-service/src/main/kotlin/com/group6/annotationservice/AnnotationServiceApplication.kt +++ b/app/annotation-service/src/main/kotlin/com/group6/annotationservice/AnnotationServiceApplication.kt @@ -13,7 +13,7 @@ class AnnotationServiceApplication { return object : WebMvcConfigurer { override fun addCorsMappings(registry: CorsRegistry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:3000", "http://game-lounge.com", "http://167.99.242.175", "http://167.99.242.175:3000") + .allowedOrigins("http://localhost:3000", "http://167.99.242.175", "http://167.99.242.175:3000", "http://game-lounge.com", "http://game-lounge.com:3000", "http://www.game-lounge.com", "http://www.game-lounge.com:3000", "https://game-lounge.com", "https://www.game-lounge.com") .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") .allowCredentials(true) .allowedHeaders("*") diff --git a/app/backend/src/main/kotlin/com/gamelounge/backend/BackendApplication.kt b/app/backend/src/main/kotlin/com/gamelounge/backend/BackendApplication.kt index 4e8d98da..ec533d6c 100644 --- a/app/backend/src/main/kotlin/com/gamelounge/backend/BackendApplication.kt +++ b/app/backend/src/main/kotlin/com/gamelounge/backend/BackendApplication.kt @@ -18,7 +18,7 @@ class BackendApplication (val userRepository: UserRepository){ return object : WebMvcConfigurer { override fun addCorsMappings(registry: CorsRegistry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:3000", "http://game-lounge.com", "http://167.99.242.175", "http://167.99.242.175:3000") + .allowedOrigins("http://localhost:3000", "http://167.99.242.175", "http://167.99.242.175:3000", "http://game-lounge.com", "http://game-lounge.com:3000", "http://www.game-lounge.com", "http://www.game-lounge.com:3000", "https://game-lounge.com", "https://www.game-lounge.com") .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") .allowCredentials(true) .allowedHeaders("*")