Skip to content

Commit

Permalink
[BE] CORS 설정에 exposedHeader를 추가한다. (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
JINU-CHANG authored and tkdgur0906 committed Oct 15, 2024
1 parent c40d088 commit b47fa0a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
Expand All @@ -21,6 +22,7 @@ public CorsFilter corsFilter() {
configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"));
configuration.addAllowedHeader("*");
configuration.setAllowCredentials(true);
configuration.addExposedHeader(HttpHeaders.LOCATION);

UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", configuration);
Expand Down

0 comments on commit b47fa0a

Please sign in to comment.