Commit 04f01a5f authored by 郝聪敏's avatar 郝聪敏

feature: 关闭csrf

parent 72afd0c4
......@@ -25,8 +25,8 @@ const pending = {};
let reqNum = 0;
axios.defaults.baseURL = basicConfig.apiHost;
axios.defaults.timeout = 30000;
axios.defaults.xsrfHeaderName = 'x-csrf-token';
axios.defaults.xsrfCookieName = 'csrfToken';
// axios.defaults.xsrfHeaderName = 'x-csrf-token';
// axios.defaults.xsrfCookieName = 'csrfToken';
const wait = async seconds => new Promise(resolve => setTimeout(resolve, seconds));
......
......@@ -41,5 +41,11 @@ export default (appInfo: EggAppConfig) => {
allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH'
};
config.security = {
csrf: {
enable: false
}
};
return config;
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment