report an error
DELETE /customers/del/5] missing csrf token. See https://eggjs.org/zh-cn/core/security.html-sharpcsrf
config.js
config.cors = {
// {string|Function} origin: "*",
allowMethods: "GET,HEAD,PUT,POST,DELETE,PATCH",
credentials: true
};
xframe: {
enable: false,
},
csrf: {
headerName: "csrftoken",
ignoreJSON: true, // false true content-type `application/json`
},
whitelist is also set. The problem now is that all GET,PUT,POST can be passed, but DELETE cannot. The foreground request is axios.delete (ip +"/ customers/del/" + id)
.I don"t understand! I hope the master will give me some advice!