From cec88b5c7847f0a8253fde63f6ca4984746c6cac Mon Sep 17 00:00:00 2001 From: Khanh Nguyen Date: Fri, 12 Jul 2024 14:18:13 +0700 Subject: [PATCH] Update WebConfig.java --- .../src/main/java/com/axonivy/market/config/WebConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/marketplace-service/src/main/java/com/axonivy/market/config/WebConfig.java b/marketplace-service/src/main/java/com/axonivy/market/config/WebConfig.java index b9d75afa3..f2214b313 100644 --- a/marketplace-service/src/main/java/com/axonivy/market/config/WebConfig.java +++ b/marketplace-service/src/main/java/com/axonivy/market/config/WebConfig.java @@ -11,7 +11,7 @@ public class WebConfig implements WebMvcConfigurer { private static final String[] EXCLUDE_PATHS = { "/", "/swagger-ui/**", "/api-docs/**" }; private static final String[] ALLOWED_HEADERS = { "Accept-Language", "Content-Type", "Authorization", - "X-Requested-By", "x-requested-with", "X-Forwarded-Host" }; + "X-Requested-By", "x-requested-with", "X-Forwarded-Host", "authorization" , "content-type"}; private static final String[] ALLOWED_METHODS = { "GET", "POST", "PUT", "DELETE", "OPTIONS" }; private final MarketHeaderInterceptor headerInterceptor; @@ -34,7 +34,7 @@ public void addInterceptors(InterceptorRegistry registry) { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOriginPatterns(marketCorsAllowedOriginPatterns) + .allowedOrigins("*") .allowedMethods(ALLOWED_METHODS) .allowedHeaders(ALLOWED_HEADERS) .maxAge(marketCorsAllowedOriginMaxAge);