Forum: NGINX Conditional return of proxied responses

Posted by Neal Richter (Guest)
on 2010-09-02 01:38
(Received via mailing list)
Hi Nginx!

  I'm using nginx-0.8.49 as a caching proxy and would like to
configure or implement the following:

Proxy incoming request to back-end servers
Check HTTP response headers for a unique string in either "Server" or
some "X-foo" lines.
IF check passes then return the response to the client
Else pass back an error message or HTTP 204.

Why?
Sometimes in systems like EC2 the backend at a given IP that used to
be yours may not be your box anymore (the IP might be reused).
Simple token-based security/sanity check that the response is coming
from your backend server.

If this can't be configured out-of-the-box.. the most logical way to
implement this is with a response filter and a nginx plug-in correct?

Thanks - Neal Richter
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.