-
-
Notifications
You must be signed in to change notification settings - Fork 211
Files stored on a different server - Protect with ngx_http_secure_link_module #3075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Using the patch fileHere is a patch that you can try: fix-3075.patch.txt To apply the patch, run the following commands: cd /path/to/e107 # where /path/to/e107 is where your installation of e107 is
wget https://github.com/e107inc/e107/files/1960370/fix-3075.patch.txt -O fix-3075.patch
patch -p 1 < fix-3075.patch To roll back the patch, run this command: patch -p 1 -R < fix-3075.patch To remove the patch file, run this command:
Using the proposed fixConfigure your NGINX download serverSet up your NGINX download location config with This is a sample $secure_link_expires$uri$remote_addr secret
Configure e107
|
Updated DocumentationConfigure e107Ideally, both e107 and NGINX should be configured at the exact same time, but e107 may be configured first because doing so would minimize the chance of disruption to downloaders, since the NGINX secure_link_md5 URL protection mode merely appends query string arguments to the download URL.
Now, all downloads will have Configure your NGINX download serverSet up your NGINX download location config with This is a sample $secure_link_expires$uri$remote_addr secret
If your server {
listen 80;
server_name secure-link-demo;
location /files {
root /var/www;
secure_link $arg_md5,$arg_expires;
secure_link_md5 "$secure_link_expires$uri$remote_addr secret";
if ($secure_link = "") { return 403; }
if ($secure_link = "0") { return 410; }
}
} If your server {
listen 80;
server_name secure-link-demo;
location /files {
root /var/www;
secure_link $arg_md5;
secure_link_md5 "$uri$remote_addr secret";
if ($secure_link = "") { return 403; }
}
} |
Updated documentation with NGINX |
I currently have a bunch of files stored on a file server and I have them stored in e107 as a direct download with referral blocking. The problem with that is that the referral can be easily spoofed, I'm looking for more security for the downloads.
Thanks!
The text was updated successfully, but these errors were encountered: