Skip to content

Commit

Permalink
[Feature] - CORS 설정에서 exposeHeader 추가
Browse files Browse the repository at this point in the history
* feat: WebConfig CORS 설정에 Loccation 헤더 expose 추가
  • Loading branch information
eunjungL authored Oct 4, 2024
1 parent 9099b9a commit 346122a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import kr.touroot.global.auth.MemberAuthMethodArgumentResolver;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
Expand Down Expand Up @@ -31,6 +32,7 @@ public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers)
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins(allowedOrigins)
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS");
.allowedMethods("GET", "POST", "DELETE", "PUT", "PATCH", "OPTIONS")
.exposedHeaders(HttpHeaders.LOCATION);
}
}

0 comments on commit 346122a

Please sign in to comment.