Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Filling Location header in njs subrequest #603

Closed Answered by userVF
userVF asked this question in Q&A
Discussion options

You must be logged in to vote

I found the solution here.
The second argument in r.return can be a redirect URL for 302 code:

  if (reply.status == 302) {
    r.return(reply.status, reply.headersOut['Location'])
    return
  }
  r.return(reply.status, reply.responseText)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by userVF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant