-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
"For the unique (and live) visitor functionality to work properly, each request must have the User-Agent and X-Client-IP-Address HTTP headers set. If you don't set these headers, the API will still work, but the unique visitor count will be incorrect."
X-Client-IP-Address is non-standard. Browsers don't provide it.
You can use this instruction how to get IP address (when there is no X-Client-IP-Address) if you don't know how. Particularly, you can write code like:
const express = require('express');
const app = express();
app.get('/get-ip', (req, res) => {
const ip = req.headers['x-forwarded-for'] || req.connection.remoteAddress;
res.json({ ip });
});
app.listen(3000, () => {
console.log('Server running on port 3000');
});Metadata
Metadata
Assignees
Labels
No labels