How can we know in advance the hash/hmac value ?
Issue #30
new
Hi there,
For my project, I need to know the Cookie values before sending any requests to nginx. It works if I use the "hash=index" because I know how many servers I got and the specific order, however, I would like to use the other hashes.
By looking a bit into the code, it seems all kind of hashes are a hash of the IP+Port (sockaddr); and it is an issue for me because the server could change its IP without notice, or having a different IP depending the DNS location.
So, I was wondering if it was possible (or better?) to hash the string from "server xxx;" definition instead of using a runtime property.
I would like to have your feedbacks on that, if possible.
Thank you in advance,
Comments (1)
-
reporter - Log in to comment
I've created a branch which uses the server string instead of IP+Port. That's definitely working and is better to know in advance the hashes values :
https://github.com/thomsonreuters/nginx-sticky-module-ng/commit/05c9b00531d0499898ba429bdd8904578c3561d1