Skip to content

Instantly share code, notes, and snippets.

@kenanfallon
Created September 22, 2016 01:32
Show Gist options
  • Save kenanfallon/260149218ad43b5252785faa5f968589 to your computer and use it in GitHub Desktop.
Save kenanfallon/260149218ad43b5252785faa5f968589 to your computer and use it in GitHub Desktop.
Protect Nginx Digital Downloads
location ~ ^/wp-content/uploads/woocommerce_uploads/(.*?)\.zip$ {
rewrite / permanent;
}
location ~ ^/wp-content/uploads/woocommerce_uploads/(.*?)\.wav$ {
rewrite / permanent;
}
location ~ ^/wp-content/uploads/woocommerce_uploads/(.*?)\.mp3$ {
rewrite / permanent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment