Merge pull request 'Fix subrequest respose for legacy app too' (!3) from antonio.calanducci/pep-container-image:master into master

Reviewed-on: #3
This commit is contained in:
Antonio Calanducci 2024-10-18 17:42:14 +02:00
commit 60777b4f57
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ function enforce_legacy(r) {
debug(context, "Redirecting..."); debug(context, "Redirecting...");
r.return(reply.status, "https://" + r.headersIn.host + reply.headersOut["Location"]) r.return(reply.status, "https://" + r.headersIn.host + reply.headersOut["Location"])
} else { } else {
r.return(reply.status, reply.responseText) r.return(reply.status, reply.responseBuffer)
} }
}).catch(e => { error(context, "Error .... " + njs.dump(e)); context.request.return(e.message === "Unauthorized" ? 403 : 500) }) }).catch(e => { error(context, "Error .... " + njs.dump(e)); context.request.return(e.message === "Unauthorized" ? 403 : 500) })
return return