fix recurrents

This commit is contained in:
xds
2025-02-21 01:44:03 +03:00
parent bf2dfca1cc
commit 363d926443
17 changed files with 618 additions and 1034 deletions

View File

@@ -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)

View File

@@ -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()
}