February 08, 2011 09:32AM
Here my config:

[code]
location /expired.html {
return 408;
# root /var/www/dl_projekt/dl/htdocs;
}
location /bad_hash.html {
root /var/www/dl_projekt/dl/htdocs;
}


location / {
root /var/www/dl_projekt/dl/htdocs;
secure_download on;
secure_download_secret DontCopy;
secure_download_path_mode file;

if ($secure_download = "-1") {
return 408;
#rewrite ^(.*)$ /expired.html break;
}
if ($secure_download = "-2") {
return 401;
#rewrite ^(.*)$ /bad_hash.html break;
}
if ($secure_download = "-3") {
return 402;
}
if ($uri ~ "^/(.*)/[0-9a-zA-Z]*/[0-9a-zA-Z]*$") {
set $filename $1;
}
# Set appropriate headers
add_header Content-Disposition "attachment; filename=$filename";
rewrite ^(.*)/[0-9a-zA-Z]*/[0-9a-zA-Z]*$ $1 break;
}
[/code]
Subject Author Posted

return 408 does not return body and status = 200

DeineAgentur February 08, 2011 09:02AM

Re: return 408 does not return body and status = 200

DeineAgentur February 08, 2011 09:28AM

Re: return 408 does not return body and status = 200

DeineAgentur February 08, 2011 09:30AM

Re: return 408 does not return body and status = 200

DeineAgentur February 08, 2011 09:32AM

Re: return 408 does not return body and status = 200

Maxim Dounin February 08, 2011 10:28AM

Re: return 408 does not return body and status = 200

DeineAgentur February 08, 2011 11:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready