Enable and allow access to h2-console
This commit is contained in:
parent
3f7a756746
commit
7e9b018d7e
@ -36,7 +36,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers(HttpMethod.GET, "/articles/feed").authenticated()
|
||||
.antMatchers(HttpMethod.POST, "/users", "/users/login").permitAll()
|
||||
.antMatchers(HttpMethod.GET, "/articles/**", "/profiles/**", "/tags").permitAll()
|
||||
.anyRequest().authenticated();
|
||||
.antMatchers("/h2-console", "/h2-console/**")
|
||||
.permitAll()
|
||||
.anyRequest().authenticated()
|
||||
.and()
|
||||
.headers().frameOptions().sameOrigin();
|
||||
|
||||
http.addFilterBefore(jwtTokenFilter(), UsernamePasswordAuthenticationFilter.class);
|
||||
}
|
||||
|
@ -5,3 +5,4 @@ jwt.sessionTime=86400
|
||||
mybatis.config-location=classpath:mybatis-config.xml
|
||||
mybatis.mapper-locations=mapper/*.xml
|
||||
logging.level.io.spring.infrastructure.mybatis.readservice.ArticleReadService=DEBUG
|
||||
spring.h2.console.enabled=true
|
Loading…
Reference in New Issue
Block a user