modified: server.js
This commit is contained in:
parent
803a40ac66
commit
088f7659ac
@ -749,6 +749,15 @@ app.get("/api/user", requireApiAuth, (req, res) => {
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/debug", (req, res) => {
|
||||
res.json({
|
||||
"X-Real-IP": req.get("X-Real-IP"),
|
||||
"X-Forwarded-For": req.get("X-Forwarded-For"),
|
||||
"req.ip": req.ip,
|
||||
"REMOTE_ADDR (если бы не было прокси)": req.connection.remoteAddress,
|
||||
});
|
||||
});
|
||||
|
||||
// Тестовый эндпоинт для проверки IP-адресов (только для отладки)
|
||||
app.get("/api/debug/ip", (req, res) => {
|
||||
const clientIP = getClientIP(req);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user