Skip to content

Commit

Permalink
Merge pull request #14 from TEAM-SEONYAK/feat/#13
Browse files Browse the repository at this point in the history
[FEAT] #13 - COOP 헤더 설정 추가
  • Loading branch information
ckkim817 authored Jul 7, 2024
2 parents 8734a3d + ed884af commit 24013af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ex) 포스트맨, 스웨거, 로그 등 -->
# 💬 To Reviewers
<!-- 리뷰어들에게 남기고 싶은 말을 적어주세요
ex) 코드 리뷰 간 참고사항, 질문 등 -->
-
-

# 🔗 Reference
<!-- 이슈를 해결하며 도움이 되었거나, 참고했던 아티클들의 링크를 첨부해 주세요 -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.header.writers.StaticHeadersWriter;

@Configuration
@RequiredArgsConstructor
Expand All @@ -23,7 +24,7 @@ public class SecurityConfig {
private final CustomAccessDeniedHandler customAccessDeniedHandler;

private static final String[] AUTH_WHITE_LIST = {
"/api/**",
"/api/v1/auth/**",
"/actuator/health",
"/v3/api-docs/**",
"/swagger-ui/**",
Expand All @@ -49,6 +50,11 @@ SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
})
.addFilterBefore(jwtAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);

// 헤더 설정 추가
http.headers(headers -> headers.addHeaderWriter(
new StaticHeadersWriter("Cross-Origin-Opener-Policy", "same-origin-allow-popups")
));

return http.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
@RequiredArgsConstructor
@Slf4j
public class GoogleSocialService implements SocialService {

@Getter
Expand Down

0 comments on commit 24013af

Please sign in to comment.