Skip to content

Commit

Permalink
Update WebConfig.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ndkhanh-axonivy committed Jul 12, 2024
1 parent 0027f05 commit cec88b5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit cec88b5

Please sign in to comment.