Try to handle gzip content.

This commit is contained in:
Andrea Dell'Amico 2022-10-24 10:59:48 +02:00
parent 3606bcf85b
commit fceb85cda2
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ http {
keepalive_timeout 65;
#gzip on;
gzip on;
include /etc/nginx/conf.d/*.conf;
}

View File

@ -45,7 +45,7 @@ function enforce(r) {
debug(context, "[REL] response status: " + reply.status)
closeAccountingRecord(context.record, (reply.status === 200 || reply.status === 201 || reply.status === 204))
context.request.subrequest("/_accounting", { detached : true, body : JSON.stringify(context.record) })
r.return(reply.status, reply.responseText)
r.return(reply.status, reply.responseBuffer)
}).catch(e => { log(context, "Error .... " + njs.dump(e)); context.request.return(e.message === "Unauthorized" ? 403 : 500)} )
return