Hi folks,

I was wondering if there is a way to have HAproxy check for an existing Cookie 
the client sends and have it verify with a specific backend (say backend1). 
Based on that backends HTTP error code (e.g. 200 or 403), HAproxy should allow 
forwarding to backend2. Of course this would need to be checked for every 
request but as this is not a high traffic site that wouldn’t be an issue.

Some more insights:

I’m currently having a backend whose backend server does not support any user 
authentication. As of today this backend is protected via HTTP Basic Auth.
Another backend in fact does strong user authentication and sets a session 
cookie for identification. This cookie is also send to the backend I’m 
currently protecting with basic auth but the backend is unable to verify this 
cookie in any way. The other backend could of course, e.g. using a simple PHP 
script just sending back 200 or 403.

Can I somehow write an ACL in HAproxy to achieve this kind of behavior? I was 
studying the docs very carefully but fear I wasn’t able to extract any way out 
of it.

Thanks for helping me out once more.


Regards,
Julian

Reply via email to