Spring security issue with 404 error?

前端 未结 4 399
梦谈多话
梦谈多话 2020-12-30 08:30

greetings all, i am using spring security 3.0.2, urlRewrite 3.1.0 , and i have a problem with spring security that i have a rule that all the pages in the app requires authe

4条回答
  •  有刺的猬
    2020-12-30 09:28

    You have said:

    i want that if the user typed a bad url if he's logged in or not, he's redirected to the error page directly

    Spring security will intercept every request before it knows whether its url is valid or not, so a way to get it would be intercept all valid urls with some patterns, and add at the end a general pattern which could be accessed by anyone.

    
      
      
      
    ...
    
    

    The problem of this configuration is that is probably difficult to find patterns for all the valid urls if your application is complex.

提交回复
热议问题