File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
java/com/back/global/security Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -46,10 +46,12 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
4646 .csrf (csrf -> csrf
4747 .csrfTokenRepository (repo )
4848 .csrfTokenRequestHandler (reqHandler )
49+ .ignoringRequestMatchers ("/h2-console/**" )
4950 )
5051 .addFilterAfter (new CsrfCookieFilter (), CsrfFilter .class )
5152 .sessionManagement (sm -> sm .sessionCreationPolicy (SessionCreationPolicy .IF_REQUIRED ))
5253 .authorizeHttpRequests (auth -> auth
54+ .requestMatchers ("/h2-console/**" ).permitAll ()
5355 .requestMatchers ("/api/v1/users-auth/**" , "/oauth2/**" , "/login/oauth2/**" ).permitAll ()
5456 .requestMatchers ("/admin/**" ).hasRole ("ADMIN" )
5557 .anyRequest ().authenticated ()
@@ -83,6 +85,7 @@ public AuthenticationManager authenticationManager(AuthenticationConfiguration a
8385 @ Bean // WebSecurityCustomizer Bean 추가
8486 public WebSecurityCustomizer webSecurityCustomizer () {
8587 return (web ) -> web .ignoring ().requestMatchers (
88+ "/h2-console/**" ,
8689 "/swagger-ui/**" ,
8790 "/v3/api-docs/**" ,
8891 "/swagger-resources/**" ,
Original file line number Diff line number Diff line change 33 url : jdbc:h2:mem:db_test;MODE=PostgreSQL;
44 username : sa
55 password :
6- driver-class-name : org.h2.Driver
6+ driver-class-name : org.h2.Driver
7+ h2 :
8+ console :
9+ enabled : true
10+ path : /h2-console
You can’t perform that action at this time.
0 commit comments