Fix bad security configuration
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
96b3582a93
commit
3220dc39ce
|
@ -53,6 +53,7 @@ class JwtAuthenticationFilter(
|
|||
val userDetails = auth.principal as UserDetails
|
||||
val token = jwtService.buildJwt(userDetails)
|
||||
|
||||
response.addHeader("Access-Control-Expose-Headers", authorizationCookieName)
|
||||
response.addHeader(authorizationCookieName, "Bearer $token")
|
||||
response.addCookie(authorizationCookieName, "Bearer$token") {
|
||||
httpOnly = true
|
||||
|
|
|
@ -89,8 +89,9 @@ abstract class BaseSecurityConfig(
|
|||
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
|
||||
.and()
|
||||
.authorizeRequests()
|
||||
.antMatchers("/api/config/**").permitAll() // Allow access to logo and icon
|
||||
.antMatchers("/api/login").permitAll() // Allow access to login
|
||||
.antMatchers("**").fullyAuthenticated()
|
||||
.antMatchers("/api/login").permitAll()
|
||||
|
||||
if (debugMode) {
|
||||
http
|
||||
|
|
Loading…
Reference in New Issue