Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get user ip address #76

Open
malaxmimdkm opened this issue Aug 19, 2021 · 2 comments
Open

get user ip address #76

malaxmimdkm opened this issue Aug 19, 2021 · 2 comments
Labels
question Further information is requested

Comments

@malaxmimdkm
Copy link

How to get user ip address

@predetermined
Copy link
Owner

If your server is not running behind a proxy, you can now use the following code since Aqua v1.3.0

app.get("/", req => {
  const remoteHostname = (req.conn?.remoteAddr as Deno.NetAddr)?.hostname;
  // ...
});

@predetermined predetermined added the question Further information is requested label Aug 28, 2021
@huydhoang
Copy link

It depends on your goal, but generally, I think getting a user IP address is not that helpful.
Because it changes too often. It's better to generate a UUID for each machine using tools like FingerprintJS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants