After CAS + Shiro is configured, it is okay to test the three major browsers in the local test environment (jetty server), but when deployed online, google redirects to favicon when logging on to CAS and redirecting back to Shiro's callback address. ICO address, because the backend does not have this address, the server has a 404 page. Why is Shiro directed to this address? I was puzzled. I found out that favicon. ICO is the website icon, which will also be requested by the browser when requesting the website. But why didn't I send a request when I first accessed the website? I guess this is related to the implementation of a specific browser. I guess Google Chrome handles this process in this way: When the logon from CAS is successful, chrome first requests favicon. ICO, because this address is intercepted by Shiro, Shiro will jump to the logon page, but Chrome may think this is an error and give you a 404 page. I personally understand. If you know the specific reason, please let us know. Thank you!
The solution is simple: Add the followingCodeTo the configuration file of Shiro so that favicon. ICO can be accessed anonymously.
/Favicon. ICO = Anon