nginx

Module ngx_http_secure_link_module


english
русский

简体中文
עברית
日本語
türkçe

news
about
download
security advisories
documentation
pgp keys
faq
links
books
support
donation

trac
wiki
twitter
nginx.com
Example Configuration
Directives
     secure_link_secret
Embedded Variables

The ngx_http_secure_link_module module (0.7.18+) checks the validity of the requested link.

This module is not built by default, it should be enabled with the --with-http_secure_link_module configuration parameter.

Example Configuration

location /p/ {
    secure_link_secret some_secret_word;

    if ($secure_link = "") {
        return 403;
    }
}

Directives

syntax: secure_link_secret word;
default:
context: location

Defines a secret word used to check the validity of the link. The full URL of the protected link looks as follows:

/prefix/hash/link

where hash is computed as

md5(link, secret_word);

A prefix is an arbitrary string not including a slash.

Embedded Variables

$secure_link
equals to the link extracted from the full URL. If hash is incorrect, this variable is set to an empty string.