nginScript
nginScript (pronounced engine script) is essentially a subset of ECMA 5.1 JavaScript with a few ECMA 6.0 extensions implemented. It is available in two versions, ngx_http_js_module for standard HTTP usage and ngx_stream_js_module for TCP stream usage. Make sure one or both of these are included in your Nginx compile, if you're not sure, you can check by using nginx -V | grep js_module in a terminal or by seeing if your main configuration file is loading either module dynamically.
nginScript works by implementing handlers that are passed two arguments, the client request and the client response. This allows you full access to the HTTP request to access and manipulate data. Additionally, nginScript allows you to assign nginScript ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access