Closed gnrlbzik closed 7 years ago
do you mind making a PR with a failing test case?
I will after i test few more things.
@jonathanong is there a guide how collaboration should be done?
or this is good enough?
yes, this a great example of making a failing test-case :)
however, i'm not sure why you're using redirect()
to set a non-redirect status code. you might as well just set the location header
Maybe i am doing this wrong. Possibly my understanding of this subject is off. let me consult web for a bit.
Original goal was to respond to none-auth user with 401 and redirect them to login page.
yeah, i am doing it wrong. i will close both : ) thanks for help
Is this a bug?
per documentation https://github.com/koajs/koa/blob/v2.x/docs/api/response.md#responseredirecturl-alt
if i set ctx.status prior ctx.redirect call my response status should be set to what ever is i specify it to, but this does not happen in my case. I have middle wear that redirects visitor for any path that does not fall under exception if they do not have authenticated session.
Am I missing something?