Prevent direct access to files but allow download from site
MAXMAXarena
nginx-forum at forum.nginx.org
Wed Mar 11 22:36:10 UTC 2020
Good evening,
I would like to block direct access to files in a folder on my site, but
allow downloading from the site.
Specifically, I want to be able to download a file from the site's html
tag:
<a href="/assets/file/test.txt" download=""> Download TXT </a>
But do not allow direct access and download, using the browser or other
tools such as curl or wget.
So block access to the link:
https://domain.com/assets/file/test.xt
is it possible to obtain such a result?
Thank you
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,287297,287297#msg-287297
More information about the nginx
mailing list