Node 跨域 Access to XMLHttpRequest at 'url' from origin 'null' has been blocked by CORS policy: Req...
如果跨域用到了put,patch方法,要在响应头设置//koaapp.use(async(ctx,next)=>{ctx.set('Access-Control-Allow-Origin','*')ctx.set("Access-Control-Allow-Methods","POST,GET,DELETE,PATCH,PUT");ctx.response.status=200;awaitnext