Merge branch 'backend' of https://github.com/TeamBNBN/edufocus into be/Quiz

This commit is contained in:
kgc9007 2024-07-24 16:08:34 +09:00
commit c911acdac9
3 changed files with 7 additions and 4 deletions

View File

@ -18,6 +18,7 @@ public class WebConfiguration implements WebMvcConfigurer {
public WebConfiguration(JWTInterceptor jwtInterceptor) {
super();
this.jwtInterceptor = jwtInterceptor;
}
@ -42,7 +43,10 @@ public class WebConfiguration implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(jwtInterceptor)
.addPathPatterns("/**") // 모든 경로에 대해 인터셉터 적용
.excludePathPatterns("/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정
.excludePathPatterns("/v3/api-docs/**","/swagger-resources/**","/webjars/**","/swagger-ui/**","/auth/**", "/board/**", "/user/**","/lecture/**","/qna/**"); // 인증 없이 접근 가능한 경로 설정
///v3/api-docs/**, /swagger-resources/**, /webjars/**
}
}

View File

@ -77,7 +77,7 @@ public class UserController {
Cookie refreshCookie = new Cookie("refresh-token", refreshToken);
refreshCookie.setPath("/");
refreshCookie.setHttpOnly(true);
refreshCookie.setSecure(true); // HTTPS에서만 전송되도록 설정
// refreshCookie.setSecure(true); // HTTPS에서만 전송되도록 설정
// refreshCookie.setSameSite(Cookie.SameSite.NONE); // Cross-Origin 요청에 대해 모두 전송
response.addCookie(refreshCookie);

View File

@ -28,8 +28,7 @@ spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
springdoc.api-docs.path=/api/v3/api-docs
springdoc.swagger-ui.path=/api/swagger-ui.html
spring.mail.host=smtp.gmail.com
spring.mail.port=587