CORS request with IE11

前端 未结 6 2059
误落风尘
误落风尘 2020-12-02 18:55

I have a CORS (cross origin resource sharing) request coming from my login page to the application site, on a different URL. I have a simple page I ping to determine if a us

6条回答
  •  生来不讨喜
    2020-12-02 19:39

    IE10 requires the server return a valid P3P policy in addition to CORS headers for cross domain requests. Here is sample php code for returning a P3P header from the server.

      $szOrigin = $_SERVER['HTTP_ORIGIN'];
      if ($szOrigin != null)
      {
            header("Access-Control-Allow-Origin: $szOrigin");
            header("Access-Control-Allow-Credentials: true");
            header("P3P: CP=\"ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI\"");
      }
    

提交回复
热议问题