summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_js.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2024-04-25Constify a bunch of static local variablesAndrew Clayton1-7/+8
A common pattern was to declare variables in functions like static nxt_str_t ... Not sure why static, as they were being treated more like string literals (and of course they are _not_ thread safe), let's actually make them constants (qualifier wise). This handles core code conversion. Reviewed-by: Zhidao HONG <z.hong@f5.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
2024-03-12NJS: loader should be registered using njs_vm_set_module_loader()Andrei Zeliankou1-10/+8
This change makes NJS module incompatible with NJS older than 0.8.3. Therefore, the configuration version check has been adjusted accordingly. This change was introduced in NJS 0.8.3 here: <https://hg.nginx.com/njs/rev/ad1a7ad3c715>
2024-02-20NJS: variable access supportZhidao HONG1-2/+3
This commit introduces the 'vars' JavaScript object to NJS, enabling direct access to native variables such as $uri and $arg_foo. The syntax is `${vars.var_name}` or `${'vars[var_name]'}`. For example: { "action": { "share": "`/www/html${vars.uri}`" } }
2024-02-20NJS: Simplified nxt_js_call()Zhidao HONG1-40/+17
2023-07-12NJS: workaround for the warning in nxt_js_call() on Freebsd12 gcc.Zhidao HONG1-4/+3
2023-07-11NJS: supported 0.8.0.Zhidao HONG1-15/+15
2023-05-08NJS: supported loadable modules.Zhidao HONG1-26/+222
2023-01-30NJS: adding the missing vm destruction.Zhidao HONG1-0/+17
This commit fixed the njs memory leak happened in the config validation, updating and http requests.
2022-11-22NJS: added http request prototype.Zhidao HONG1-3/+72
2022-11-20Basic njs support.Zhidao HONG1-0/+230