在配置中,DI $httpProvider
,然后将withCredentials设置为true:
.config(function ($httpProvider) {
$httpProvider.defaults.withCredentials = true;
//rest of route code
})
$ http不在请求中发送cookie
在配置中,DI $httpProvider
,然后将withCredentials设置为true:
.config(function ($httpProvider) {
$httpProvider.defaults.withCredentials = true;
//rest of route code
})