Solution to session loss when CAS Ajax logon is used for cross-Origin

Source: Internet
Author: User

Problem: In IE browser, domain name a uses IFRAME to post login information to the CAS server with Domain Name B, after debugging, it is found that the sessionid obtained by a for loginticket is inconsistent with the sessionid obtained after post. Only IE browser has this problem, Firefox Google browser is normal.

Cause: Query InformationThe p3p (Platform for privacy preferences Project (p3p) Specification) protocols supported by IE6 and IE7 prevent third parties from using cookies without privacy security claims by default. Firefox and Google do not currently support p3p security features, so they do not have this problem.

Solution: When obtaining loginticket for the first time, set the p3p declaration in response as follows:

Response. setheader ("p3p", "cp = Cura ADMA Deva psao psdo our bus uni pur int DEM sta pre com nav OTC Noi DSP cor ");

Related Article

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.