secure_token_last_modified
The secure_token_last_modified directive specifies the last modified timestamp for secure tokens in NGINX.
Description
The secure_token_last_modified directive is part of the Secure Token module for NGINX, which is designed to facilitate the generation of secure tokens for CDN media delivery. This directive allows the user to set the last modified timestamp for a secure token, ensuring that when the token is generated, it includes the appropriate modification time in its encrypted format. This can be particularly important for CDN providers that require this timestamp to validate and authenticate requests to media assets.
The directive takes a single argument, which is expected to be a valid timestamp. This timestamp serves as a reference for the last modification time, and is utilized during the signing process of the secure token. When configured correctly, the token will incorporate this timestamp as part of its payload, enhancing the security and usability of the token for accessing media content. The behavior may differ based on the context in which it is applied, such as in the http, server, or location blocks, allowing for flexibility in its usage across different parts of the NGINX configuration.
As part of its execution, the configuration of this directive must be precise; otherwise, authorization failures may occur if the timestamp does not match the expectations of the receiving CDN. Proper handling of this directive ensures that users can secure their media assets effectively without compromising on accessibility or security requirements.
Config Example
http {
secure_token_last_modified 1630443600;
}Ensure the timestamp provided is in the correct format; otherwise, token generation may fail.
Setting the last modified time too far in the past can lead to authorization issues with CDNs.