CAS + Shiro's bizarre jump in Google's browser

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.