js_fetch_verify_depth

The `js_fetch_verify_depth` directive sets the depth of verification for fetched data in NGINX njs modules.

Syntaxjs_fetch_verify_depth integer;
Defaultnone
Contextstream, stream server
Arguments1

Description

The js_fetch_verify_depth directive is utilized within the NGINX njs dynamic module context, specifically in stream and stream server contexts. It defines the number of verification levels when fetching data, enabling the module to ensure data integrity and authenticity up to a specified depth. This directive plays a crucial role when dealing with complex data fetching scenarios where multiple layers of data validation are necessary to maintain accuracy and trustworthiness.

The argument for this directive is a single integer, which indicates the level of verification desired. For instance, a higher value suggests more in-depth checks, possibly adding latency but increasing security against corrupted or unverified data. Users can adjust this parameter based on performance and security needs, thus tailoring the behavior of data fetching to fit their application requirements.

The effect of this directive is particularly significant for applications that rely heavily on client interactions or third-party data, where ensuring data correctness and security is paramount. Failing to set an appropriate verification depth might expose the system to risks of data manipulation or other vulnerabilities, while an excessively high depth might lead to performance degradation.

Config Example

stream {
    server {
        js_fetch_verify_depth 3;
        # other server directives
    }
}

Setting js_fetch_verify_depth to a very high value may lead to performance issues.

Ensure that the argument is an appropriate integer; non-integer values will cause configuration errors.

← Back to all directives