Setting cookies for subdomain

点点圈 提交于 2019-11-29 12:28:24

The problem you're describing is related to cross domain cookie policies. I don't know your exact use-case, but looking at CORS and P3P headers should give you a good start. As an option, you can try setting your cookie manually via Javascript.

Making CORS working isn't enough, you also need to enable withCredentials in angular.

https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials

Example:

angular.module('example', []).config(function ($httpProvider) {
    $httpProvider.defaults.withCredentials = true;
});
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!