nodejs likes my test script, but njs does not: root@tact_manager_nginx:/tmp# NODE_PATH=$(pwd) nodejs ./t ddaf35a193617abacc417349ae20413112e6fa4e89a97ea20a9eeee64b55d39a2192992a274fc1a836ba3c23a3feebbd454d4423643ce80e2a9ac94fa54ca49f root@tact_manager_nginx:/tmp# njs ./t Thrown: SyntaxError: Token "sha512" not supported in this version in ./t:2 root@tact_manager_nginx:/tmp#by dstromberg - How to...
With the js-sha512 implementation I get: root@tact_manager_nginx:/tmp# cat t #!/usr/bin/env njs const { sha512, sha384, sha512_256, sha512_224 } = require('js-sha512'); console.log(sha512("abc")); root@tact_manager_nginx:/tmp# ./t Thrown: SyntaxError: Token "sha512" not supported in this version in ./t:2 root@tact_manager_nginx:/tmp# Is njs not compatible enoughby dstromberg - How to...
I tried https://github.com/emn178/js-sha512 and https://github.com/indutny/hash.js and found that neither one was tremendously compatible with njs. And the Cryptocoin implementation is deprecated.by dstromberg - How to...
I need to replace one log field, from nginx.conf, with its SHA-512 hash, for security reasons. I'd prefer to do this with njs, but would consider Lua. I'm finding a chicken-and-the-egg problem when I try to do this with njs. More specifically, the only way I know of to modify a log field is js_set, but js_set wants synchronous code, while njs' crypto.subtle.digest("SHA-512", msgUint8)by dstromberg - How to...
Then again, maybe https://nginx.org/en/docs/http/ngx_http_js_module.html is doing sha-512.by dstromberg - Nginx Mailing List - English
https://github.com/nginx/njs/issues/192 looks promising as a way of changing a header. On the other hand, njs appears to not support sha512?by dstromberg - Nginx Mailing List - English
I'm an Nginx neophyte. I'm currently logging like this: //\\//\\//\\//\\ http { log_format main escape=json '{' '"remote_addr":"$remote_addr",' '"remote_user":"$remote_user",' '"time_local":"$time_iso8601",' '"request":"$request",' '"request_method":&quoby dstromberg - Nginx Mailing List - English
It's been a week... No one knows? Is this a FAQ? Even with the shorter-than-specified timeouts? Thanks.by dstromberg - Nginx Mailing List - English
Hi folks. I have a REST API behind nginx. Sometimes we get back an http 504 despite our software being up, and we don't want that, at least not for idempotent requests. We don't want 504's for idempotent requests even if it means waiting a while for a response. I'd look at the application to see what's taking too long, but it's actually happening for a very simple health check of the APIby dstromberg - Nginx Mailing List - English