Fix subrequest respose for legacy app too #3

Merged
antonio.calanducci merged 1 commits from antonio.calanducci/pep-container-image:master into master 2024-10-18 17:42:15 +02:00
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ function enforce_legacy(r) {
debug(context, "Redirecting...");
r.return(reply.status, "https://" + r.headersIn.host + reply.headersOut["Location"])
} 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) })
return