Skip to content

Instantly share code, notes, and snippets.

@waynehoover
Created September 16, 2013 07:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waynehoover/6577717 to your computer and use it in GitHub Desktop.
Save waynehoover/6577717 to your computer and use it in GitHub Desktop.
nginx secure_link rails
# Downloads server
server {
listen 80;
server_name files.domain.com;
root /some/path/files.domain;
location /downloads {
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri DOWNLOAD_SECRET";
if ($secure_link = "") {
return 403;
}
if ($secure_link = "0") {
return 410;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment