Skip to content

Commit

Permalink
MATE-125 : [FEAT] 프론트엔드 엔드포인트 CORS 연결 허용 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
jooinjoo committed Dec 9, 2024
1 parent 9ee0bbc commit 1ca7625
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Deploy To EC2
on:
push:
branches:
- develop
push

jobs:
deploy:
Expand Down
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 1ca7625

Please sign in to comment.