From 711d67c1d3ed633b497e24986247e3d73f9c477c Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 15 Oct 2018 13:11:07 +0800 Subject: [PATCH] tweak --- src/mock/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mock/index.js b/src/mock/index.js index 414a2563..3e00e918 100644 --- a/src/mock/index.js +++ b/src/mock/index.js @@ -4,9 +4,10 @@ import articleAPI from './article' import remoteSearchAPI from './remoteSearch' import transactionAPI from './transaction' -// * 修复 Mock 情况下,设置 withCredentials = true,且未被拦截的跨域请求丢失 Cookies 的问题 +// 修复在使用 MockJS 情况下,设置 withCredentials = true,且未被拦截的跨域请求丢失 Cookies 的问题 +// https://github.com/nuysoft/Mock/issues/300 Mock.XHR.prototype.proxy_send = Mock.XHR.prototype.send -Mock.XHR.prototype.send = function () { +Mock.XHR.prototype.send = function() { if (this.custom.xhr) { this.custom.xhr.withCredentials = this.withCredentials || false }