Cross domain cookie using CORS in Safari

后端 未结 3 1146
我在风中等你
我在风中等你 2021-02-19 11:28

I followed the example: http://arunranga.com/examples/access-control/credentialedRequest.html

from this page: http://arunranga.com/examples/access-control/

The e

3条回答
  •  感情败类
    2021-02-19 11:50

    I encountered this with API/UI apps on different subdomains of Heroku, like my-api.herokuapp.com and my-ui.herokuapp.com, session cookie was set for my-api.herokuapp.com. Even visiting my-api.herokuapp.com didn't seem to help Safari in this case with its default 'Only from sites I visit' policy @23inhouse mentioned: http://content.screencast.com/users/artemv/folders/Jing/media/4dfc08d7-0e9c-483f-a272-bbe91549ea95/00000759.png.

    However, Safari worked just fine when we assigned a custom domain to these apps and it became my-api.mydomain.com and my-ui.mydomain.com - so it looks like Safari has particularly low trust to popular hosters' subdomains. No direct visit to my-api.mydomain.com was needed in this case.

提交回复
热议问题