https://github.com/koajs/cors/blob/master/index.js#L138
ru4ert opened this issue · 0 comments
ru4ert commented
I got it :https://github.com/koajs/cors/blob/master/index.js#L138
Originally posted by @slip-box in #71 (comment)
allowHeaders don't proxy custom headers [1] to koa middleware. [2]
[1]
server.applyMiddleware({
app,
cors: {
allowHeaders: ['authorization'],
},
})
[2]
export const app = new Koa()
app.use(async (ctx, next) => {
ctx.req.headers.authorization // this is undefined
})