module's development and X-Accel-Redirect

Maxim Dounin mdounin at
Sun Mar 30 22:38:12 MSD 2008


On Sun, Mar 30, 2008 at 06:40:51PM +0200, Chavelle Vincent wrote:

>Hi all
>My problem refers to the development of a new module for nginx and I
>need to use X-Accel-Redirect header to implement controlled downloads...
>I have followed
>and I have replaced php code : header("X-Accel-Redirect: /files/" .
>by a new module for nginx
>Nothing happens and i don't know why ! I need advices :)

Processing of 'X-Accel-Redirect' header resides in 
ngx_http_upstream.c, i.e. it's handled only by 

When writing nginx module you should use 
ngx_http_internal_redirect() function instead.

Maxim Dounin

More information about the nginx mailing list