FAQ

Page Discussion Edit History

NginxHttpSecureLinkModule

Contents

Edit section: Synopsis Synopsis

This module computes and checks request URLs for a required security token. This module is not compiled by default and must be specified using the

--with-http_secure_link_module

argument to configure when compiling Nginx. Note that this module is only supported in nginx version 0.7.18 and higher.

Edit section: Example usage: Example usage:

location /prefix/ {
    secure_link_secret   secret_word;
 
    if ($secure_link = "") {
        return 403;
    }
}

Edit section: 
Directives 
Directives

syntax: secure_link_secret secret_word

default: none

context: location

The directive specifies a secret word to verify requests. The full URL for a protected links follows this form:

/prefix/hash/reference

hash is computed as as

md5 (reference, secret_word);

prefix is the scope of the location block, and must not be '/'. secure_link can only be used in non-root paths.

Edit section: Variables Variables

Edit section: $secure_link $secure_link

Automatically set to the reference component of the URL, isolated from the prefix and hash. If the hash is incorrect, an empty string is returned instead.