WalletConnect / blockchain-api

WalletConnect's Blockchain API
MIT License
51 stars 40 forks source link

fix(network): using the last forwarded IP from the list #678

Closed geekbrother closed 2 months ago

geekbrother commented 2 months ago

Description

This PR changes the user IP to get the last IP from the list in X-Forwarded-For instead of the first since the AWS Load Balancer appends the IP to the end.

How Has This Been Tested?

Not tested.

Due Diligence

geekbrother commented 2 months ago

I think this works, but can we switch to this library? https://github.com/WalletConnect/push-server/blob/8b7d285271d011061b6aa282eacecc8587b2529b/src/lib.rs#L202

Added the unit test to make sure it works as expected. Yes, this should be a follow-up after this quick fix.