Skip to content

Commit

Permalink
MATE-125 : [FEAT] S3 정적 호스팅 페이지 CORS 연결 허용 설정 (#115)
Browse files Browse the repository at this point in the history
* MATE-125 : [FEAT] 프론트엔드 엔드포인트 CORS 연결 허용 설정

* MATE-125 : [CHORE] deploy.yml 설정을 develop 브랜치 push 기준으로 재변경
  • Loading branch information
jooinjoo authored Dec 10, 2024
1 parent 9ee0bbc commit ff86740
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.example.mate.common.config;

import com.example.mate.common.security.filter.JwtCheckFilter;
import java.util.List;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -16,6 +15,8 @@
import org.springframework.web.cors.CorsConfigurationSource;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;

import java.util.List;

@Configuration
@EnableWebSecurity
@EnableMethodSecurity
Expand Down Expand Up @@ -45,7 +46,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
public CorsConfigurationSource corsConfigurationSource() {
CorsConfiguration config = new CorsConfiguration();

config.setAllowedOrigins(List.of("http://localhost:5173", "http://localhost:8080"));
config.setAllowedOrigins(List.of("http://localhost:5173", "http://localhost:8080", "http://catchmi-web-page.s3-website.ap-northeast-2.amazonaws.com/"));
config.setAllowedMethods(List.of("GET", "POST", "PUT", "DELETE", "PATCH"));
config.setAllowedHeaders(List.of("Authorization", "Content-Type", "Cache-Control"));
config.setAllowCredentials(true);
Expand Down

0 comments on commit ff86740

Please sign in to comment.