Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public CorsConfigurationSource corsConfigurationSource() {
config.setAllowCredentials(true);

// 허용할 origin(출처, 도메인)
config.setAllowedOrigins(List.of("http://localhost:5173"));
config.setAllowedOrigins(List.of(
"http://localhost:5173",
"http://43.202.8.13:8080"

));
// 예: React/Vite 개발 서버에서 오는 요청 허용

// 허용할 HTTP Method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
response.setCharacterEncoding("UTF-8");

// 3. 반환할 데이터 생성
GlobalResponse<Void> globalResponse = GlobalResponse.success("403", "로그인 실패");
GlobalResponse<Void> globalResponse = GlobalResponse.error("403", "로그인 실패");

// 4. objectMapper로 자바 객체 JSON으로 직렬화
objectMapper.writeValue(response.getWriter(), globalResponse);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spring:
database-platform: org.hibernate.dialect.MySQLDialect # Hibernate에서 사용할 MySQL 방언(dialect) 설정
show-sql: true # 실행된 SQL 쿼리를 콘솔에 출력할지 여부 설정
hibernate:
ddl-auto: create # 애플리케이션 실행 시 데이터베이스 스키마의 상태를 설정, -> 첫 배포할 때는 create로 설정
ddl-auto: update # 애플리케이션 실행 시 데이터베이스 스키마의 상태를 설정, -> 첫 배포할 때는 create로 설정
properties:
hibernate:
format_sql: true # 출력되는 SQL 쿼리를 보기 좋게 포맷팅
Expand Down
Loading