Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

https://github.com/koajs/cors/blob/master/index.js#L138 #79

Open
ru4ert opened this issue Oct 17, 2021 · 0 comments
Open

https://github.com/koajs/cors/blob/master/index.js#L138 #79

ru4ert opened this issue Oct 17, 2021 · 0 comments

Comments

@ru4ert
Copy link

ru4ert commented Oct 17, 2021

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
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant