Updated properties and enhanced SecurityConfig
- Changed `server.forward-headers-strategy` to `native` in `application.properties`. - Added exclusion for `/login/oauth2/code/**` in CSRF configuration.
This commit is contained in:
parent
3f0644c1e9
commit
8cb922a88d
2 changed files with 3 additions and 1 deletions
|
|
@ -73,6 +73,7 @@ public class SecurityConfig {
|
|||
.jwtAuthenticationConverter(jwtAuthenticationConverter())
|
||||
)
|
||||
)
|
||||
|
||||
.exceptionHandling(ex -> ex
|
||||
.defaultAuthenticationEntryPointFor(
|
||||
new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED),
|
||||
|
|
@ -82,6 +83,7 @@ public class SecurityConfig {
|
|||
.csrf(csrf -> csrf
|
||||
.csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse())
|
||||
.csrfTokenRequestHandler(new LccCsrfTokenRequestHandler())
|
||||
.ignoringRequestMatchers("/login/oauth2/code/**")
|
||||
)
|
||||
.addFilterAfter(new CsrfCookieFilter(), BasicAuthenticationFilter.class)
|
||||
.addFilterBefore(
|
||||
|
|
|
|||
|
|
@ -23,4 +23,4 @@ spring.flyway.enabled=true
|
|||
spring.flyway.locations=classpath:db/migration
|
||||
spring.flyway.baseline-on-migrate=true
|
||||
spring.sql.init.mode=never
|
||||
server.forward-headers-strategy=framework
|
||||
server.forward-headers-strategy=native
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue