给定一个CORS API,它需要 session cookie来跟踪用户在结帐过程中的移动,因此在多个浏览器中都存在问题,直到用户访问该API所在的网站后,cookie才设置。
例如:
johnny.com uses an CORS JSON API from jacob.com. jacob.com sets a cookie after the first AJAX call is made, but some browsers will not set the cookie for subsequent calls. Therefore the API will not function as expected.
浏览器行为:
故意禁用。似乎没有解决方法
这。
非常感谢您对如何解决这些问题有任何见解。
最佳答案
不幸的是,似乎没有选择使它在所有浏览器上都能正常工作。
Safari now restricts Cookie的第三方使用。
似乎最好是评估替代方案:
Paypal还创建了一些基于js的解决方案来尝试解决此类问题:https://medium.com/@bluepnume/introducing-paypals-open-source-cross-domain-javascript-suite-95f991b2731d
关于api - 第三方Cookie-具有/ session 跟踪的跨域API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46839903/