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

when i use compose middlewares koa routes run two times #19

Closed
Yang03 opened this issue Jun 21, 2016 · 5 comments
Closed

when i use compose middlewares koa routes run two times #19

Yang03 opened this issue Jun 21, 2016 · 5 comments

Comments

@Yang03
Copy link

Yang03 commented Jun 21, 2016

this is my code

const middlewares = compose([
    favicon(__dirname + '/favicon.ico'),
    bodyParser({formLimit: '5mb'}),
    json(),
    router.routes(),
    router.allowedMethods()
])

app.use(middlewares)

@haoxins
Copy link
Member

haoxins commented Jun 22, 2016

koa routes run two times

Can you get the request path? Maybe one is /favicon.ico.

Anyway, I don't think it's related with this module! >_<

@Yang03
Copy link
Author

Yang03 commented Jun 22, 2016

image
when i remove this module, the router work normal

@haoxins
Copy link
Member

haoxins commented Jun 22, 2016

Can you give a whole example to reproduce this ?

@Yang03
Copy link
Author

Yang03 commented Jun 22, 2016

I am on 18th floor, Let's talk face to face,or I can go upstair .

@haoxins haoxins closed this as completed Jun 24, 2016
@haoxins
Copy link
Member

haoxins commented Jun 24, 2016

Chrome extension trigger second request >_<

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

2 participants