indutny / sticky-session

Sticky session balancer based on a `cluster` module
964 stars 99 forks source link

ipv6 support #57

Open Valentinishe opened 6 years ago

Valentinishe commented 6 years ago

Hello guys, I tried to use this useful module, but got error with ipv6 address.

Error: Invalid ip address: ::ffff:127.0.0.1

Can u help me solve this or this is nginx issue?

Valentinishe commented 6 years ago

Here is stack trace

  - ip.js:38 Object.toBuffer
    [7d73f827bc3bedf3]/[ip]/lib/ip.js:38:11

  - master.js:80 Master.balance
    [7d73f827bc3bedf3]/[sticky-session]/lib/sticky/master.js:80:17
Valentinishe commented 6 years ago

And also here is exception on double ip.

Error: Invalid ip address: 203.87.250.246, 107.167.112.229