Skip to content
Advertisement

Tag: single-page-application

Spring Security: redirect to single page app in case of 401

When I type into browser any route of my React app, for example: http://localhost/login, the request hits my server, and my server responds with 401 Unauthorized. When request is not an authorized backend api I’d like to handle the request in my react routing. WebSecurityConfig.java: RestAuthenticationEntryPoint.java: Is there a way to forward the request to index.html in RestAuthenticationEntryPoint? Answer I’ve

Advertisement