fix(backend): normalize strategy data and proxy ip parsing

This commit is contained in:
sagit
2026-02-13 09:42:38 +00:00
parent f01c0481cd
commit cf6294a77d
7 changed files with 71 additions and 10 deletions
@@ -567,6 +567,13 @@ func TestAuthPeerAllowedIPs(t *testing.T) {
xff: "198.51.100.20, 172.20.0.3",
wantAllowed: true,
},
{
name: "ipv4-mapped proxy xff allowed",
allowedIPs: "198.51.100.20",
remoteAddr: "[::ffff:172.20.0.3]:34567",
xff: "198.51.100.20, 172.20.0.3",
wantAllowed: true,
},
{
name: "non whitelisted ip denied",
allowedIPs: "203.0.113.10",