param_name

The `param_name` directive specifies the name of the query parameter used for secure token generation in NGINX configurations utilizing the Secure Token Module.

Syntaxparam_name string;
Defaultnone
Context
Arguments1

Description

The param_name directive is part of the Secure Token Module for NGINX, which is used to generate secure tokens for content delivery networks (CDN) such as Akamai and Amazon CloudFront. By setting this directive, administrators can define a specific name for the query string parameter that will be included in the generated secure tokens. This allows for more flexibility in API design and user interaction, as the specified parameter name can be easily recognized and parsed by clients or applications utilizing the token.

When implementing this directive, the user must provide a single argument defining the name of the parameter. This name can then be used to dynamically embed the resulting secure token into URLs or manifest files. The secure token contains essential components like expiration times and optional access control lists (ACL), ensuring that content is only accessible under specific conditions. The param_name directive thus plays a critical role in integrating secure token logic with the overall NGINX configuration, ensuring proper identification and usage by client applications.

This directive will be particularly useful in scenarios where different tokens are generated, and the parameter naming needs to be distinct to avoid conflicts or confusion. Proper usage of param_name helps in maintaining clean and organized URL structures, making the CDN interactions seamless while also upholding the integrity of secure access control measures.

Config Example

secure_token_akamai {
    param_name my_token;
    key abc123;
    acl all;
    start 0;
    end 3600;
}

Make sure the parameter name does not clash with other existing query parameters.

Ensure that clients are informed of the parameter name so they can correctly parse the tokens.

Keep in mind that changing the param_name requires updates in all client applications that rely on it.

← Back to all directives