koa2构建api,通过koa2-cors设置允许跨域,在预请求options过不去,请求状态值200,但是提示Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
url: message/send
method: post
content-type:application/json
以下是请求结构截图


以下是koa2-cors配置
app.use(cors({
origin: '*',
credentials: true,
exposeHeaders: ['WWW-Authenticate', 'Server-Authorization'],
allowMethods: ['OPTIONS', 'GET', 'PUT', 'POST', 'DELETE'],
allowHeaders: ['x-requested-with', 'accept', 'origin', 'content-type'],
maxAge: 1728000
}))
第一版本正常,第二版本就出现这个问题,而且其他接口没有问题,请求大神指点,我的配置参数是不是哪里不对呀!
大神提供一下思路,或者有什么好的中间件也可以