Skip to content

Commit

Permalink
Merge pull request #81 from SWM-Flash/integration
Browse files Browse the repository at this point in the history
헬스체크 경로 추가
  • Loading branch information
ChoiWonYu authored Oct 7, 2024
2 parents 341db60 + f60f4ad commit 25c30e0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/java/com/first/flash/global/config/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public class SecurityConfig {
private static final String[] AUTH_WHITELIST = {
"/auth/login",
"/swagger-ui/*",
"/v1/api-docs/**"
"/v1/api-docs/**",
"/flash-climbing-answer-health/**"
};
private static final String COMPLETE_REGISTRATION = "/members";
private static final String MARKETING_CONSENT = "/members/marketing-consent";
Expand Down Expand Up @@ -61,9 +62,12 @@ public SecurityFilterChain filterChain(final HttpSecurity http) throws Exception
.authorizeHttpRequests(authorize -> authorize
.requestMatchers(AUTH_WHITELIST).permitAll()
.requestMatchers("/admin/**").hasRole("ADMIN")
.requestMatchers(HttpMethod.POST, MARKETING_CONSENT).hasAnyRole("ADMIN", "USER", "UNREGISTERED_USER")
.requestMatchers(HttpMethod.GET, NICKNAME_DUPLICATE).hasAnyRole("ADMIN", "USER", "UNREGISTERED_USER")
.requestMatchers(HttpMethod.PATCH, COMPLETE_REGISTRATION).hasAnyRole("ADMIN", "USER", "UNREGISTERED_USER")
.requestMatchers(HttpMethod.POST, MARKETING_CONSENT)
.hasAnyRole("ADMIN", "USER", "UNREGISTERED_USER")
.requestMatchers(HttpMethod.GET, NICKNAME_DUPLICATE)
.hasAnyRole("ADMIN", "USER", "UNREGISTERED_USER")
.requestMatchers(HttpMethod.PATCH, COMPLETE_REGISTRATION)
.hasAnyRole("ADMIN", "USER", "UNREGISTERED_USER")
.requestMatchers(HttpMethod.GET, "/**").hasAnyRole("ADMIN", "USER", "WEB")
.requestMatchers("/**").hasAnyRole("ADMIN", "USER")
.anyRequest().authenticated()
Expand Down

0 comments on commit 25c30e0

Please sign in to comment.