You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There seems to be a bug when using FORWARDED_FOR_HEADER.
I have scc-state behind a AWS ALB load balancer, which add "X-Forwarded-For" header to HTTP request to inform about the callers IP address. I added FORWARDED_FOR_HEADER="x-forwarded-for" to scc-state, and based on the logs from scc-state, it is reporting correctly the IP address of scc-worker and scc-broker processes connection to scc-state via the ALB.
// Only set instanceIpFamily if data.instanceIp is provided.
I'm not sure if this is considered a bug, but I expected scc-state to be able to detect what instanceIpFamily should be when using FORWARDED_FOR_HEADER.
The text was updated successfully, but these errors were encountered:
toredash
changed the title
Bug: using FORWARDED_FOR_HEADER threats IP as IPv6
Bug: using FORWARDED_FOR_HEADER treats IP as IPv6
Oct 22, 2019
Uh oh!
There was an error while loading. Please reload this page.
There seems to be a bug when using FORWARDED_FOR_HEADER.
I have scc-state behind a AWS ALB load balancer, which add "X-Forwarded-For" header to HTTP request to inform about the callers IP address. I added FORWARDED_FOR_HEADER="x-forwarded-for" to scc-state, and based on the logs from scc-state, it is reporting correctly the IP address of scc-worker and scc-broker processes connection to scc-state via the ALB.
But when scc-state calls
getSCCBrokerClusterState
, it will return an URI with brackets [] : https://github.com/SocketCluster/scc-state/blob/master/server.js#L79-L85, causing the workers to throw an parse error sincews://[10.150.34.147]:50020/socketcluster
is not a valid URI.It will only return a non-bracket (IPv4) URI if
instanceIp
is provided :scc-state/server.js
Line 193 in 68b1b86
I'm not sure if this is considered a bug, but I expected scc-state to be able to detect what
instanceIpFamily
should be when usingFORWARDED_FOR_HEADER
.The text was updated successfully, but these errors were encountered: