fix recurrents
This commit is contained in:
@@ -26,7 +26,7 @@ class BearerTokenFilter(private val authService: AuthService) : SecurityContextS
|
||||
override fun filter(exchange: ServerWebExchange, chain: WebFilterChain): Mono<Void> {
|
||||
val token = exchange.request.headers.getFirst(HttpHeaders.AUTHORIZATION)?.removePrefix("Bearer ")
|
||||
|
||||
if (exchange.request.path.value() in listOf("/api/auth/login","/api/auth/register") || exchange.request.path.value()
|
||||
if (exchange.request.path.value() in listOf("/api/auth/login","/api/auth/register", "/api/auth/tgLogin") || exchange.request.path.value()
|
||||
.startsWith("/api/actuator")
|
||||
) {
|
||||
return chain.filter(exchange)
|
||||
|
||||
@@ -25,7 +25,7 @@ class SecurityConfig(
|
||||
|
||||
.logout { it.disable() }
|
||||
.authorizeExchange {
|
||||
it.pathMatchers(HttpMethod.POST, "/auth/login", "/auth/register").permitAll()
|
||||
it.pathMatchers(HttpMethod.POST, "/auth/login", "/auth/register", "/auth/tgLogin").permitAll()
|
||||
it.pathMatchers("/actuator/**").permitAll()
|
||||
it.anyExchange().authenticated()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user