Send IP address from frontend using ReactJS to server NodeJS
Asked Answered
I

2

6

At present I am using WEBRTC for getting IP address from client side.

But I have issues with browsers like Internet Explorer etc. I don't want to hit other third party servers for getting IP.

Is there a way to get IP address from ReactJS without hitting third party servers.

Isabelleisac answered 7/1, 2018 at 14:25 Comment(0)
V
1

You can make a request to your own nodejs server and reply with the IP address. that way 3rd party servers wont be involved.

Vaporescence answered 8/1, 2018 at 11:6 Comment(0)
S
1

Check sample express code below and use

app.get('/getIP', getClientIP);

Sample code

Subsistent answered 8/1, 2018 at 13:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.