From 49db00abfdb66a760583fd97af8aa7677ac299a8 Mon Sep 17 00:00:00 2001 From: luyuan <1162963624@qq.com> Date: Mon, 22 Feb 2021 15:01:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'app.js'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index f544ae0..df89078 100644 --- a/app.js +++ b/app.js @@ -13,7 +13,7 @@ app.use(async (ctx, next) => { ctx.set("Access-Control-Allow-Methods", "OPTIONS, GET, PUT, POST, DELETE"); // 字段是必需的。它也是一个逗号分隔的字符串,表明服务器支持的所有头信息字段. - ctx.set("Access-Control-Allow-Headers", "x-requested-with, accept, origin, content-type"); + ctx.set("Access-Control-Allow-Headers", "x-requested-with, accept, origin, content-type, referer"); // 服务器收到请求以后,检查了Origin、Access-Control-Request-Method和Access-Control-Request-Headers字段以后,确认允许跨源请求,就可以做出回应。 // Content-Type表示具体请求中的媒体类型信息