virtual include authorization using proxy_pass and X-Accel-Redirect
Hannes Haug
hannes at haug.com
Mon Dec 8 22:32:36 MSK 2008
Hi all
I'd like to implement authorization using proxy_pass and X-Accel-Redirect like
# Pass all requests to the application server.
# This performs access control and returns either
# X-Accel-Redirect: /internal/... (allow)
# or status 403 (deny).
location / {
proxy_path http://application_server:port
}
# Serve resources checked by the application.
location /internal/ {
internal;
rewrite ^/internal/(.*) $1;
}
Is there a way to enforce this authorization for virtual includes, too?
<!--# include virtual="/internal/..."-->
seems to bypass the check since it's an internal request.
Thanks
Hannes
More information about the nginx
mailing list