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
@@ -1,4 +1,4 @@
package backend.pirocheck.User.config;
package backend.pirocheck.config;

import backend.pirocheck.User.filter.SessionCheckFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package backend.pirocheck.User.config;
package backend.pirocheck.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
Expand All @@ -10,7 +10,7 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/api/**") // 백엔드 API 요청에만 CORS 허용
.allowedOrigins("http://pirocheck.org") // 프론트 배포 URL
.allowedOrigins("http://pirocheck.org:3000") // 프론트 배포 URL
.allowedMethods("GET", "POST", "PUT", "DELETE") // 허용할 HTTP 메서드
.allowCredentials(true); // 세션 쿠키 주고받기 허용
}
Expand Down
3 changes: 2 additions & 1 deletion backend/pirocheck/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ server:
http-only: true # 세션 쿠키를 HttpOnly로 설정 (JS에서 접근 불가)
secure: false # HTTPS 전용 전송 (Https -> true로 바꿔야 함)
same-site: Lax # CSRF 방지
timeout: 30m # 세션 타임아웃 30분 (30 minutes)
timeout: 30m # 세션 타임아웃 30분 (30 minutes)
address: 0.0.0.0