X-Accel-Redirect cannot work with a filter?

ckong nginx-forum at nginx.us
Mon Jul 26 18:19:54 MSD 2010


Hi fellows,

My scenario is request a image by its id and respond a fixed
size(150*200) image, such as
[code]
http://foo.com/image?id=1
[/code]
a backend is used for query file's path in DB by id

My configuration is:
step 1), pass the request to the backend:
[code]
location /image{
proxy_pass backend;
}
[/code]

step 2),  in the backend, set the ' X-Accel-Redirect ', for example, "
X-Accel-Redirect :/internal/test.jpg"

setp 3), respond the file and aslo do image_filter
[code]
location /internal {
internal;
image_filter   resize  150 200;
alias /datastore/;
}
[/code]

But it doesn't work. I guess  X-Accel-Redirect  cannot work with a
filter, am i right?
If so, how can I make this scenario work?

Thanks!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,113039,113039#msg-113039




More information about the nginx mailing list