February 2018
Beginner to intermediate
348 pages
9h 40m
English
Totally independent from the SSL module, Secure Link provides a basic protection by checking the presence of a specific hash in the URL before allowing the user to access a resource:
location /downloads/ {
secure_link_md5 "secret";
secure_link $arg_hash,$arg_expires;
if ($secure_link = "") {
return 403;
}
}
With such a configuration, documents in the /downloads/ folder must be accessed via a URL containing a query string parameter, hash=XXX (note the $arg_hash in the example), where XXX is the MD5 hash of the secret you defined through the secure_link_md5 directive. The second argument of the secure_link directive is a UNIX timestamp defining the expiration date. The $secure_link variable is empty if the URI does not contain ...
Read now
Unlock full access