mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
ip api test 3 debug
This commit is contained in:
parent
bcc7e84db7
commit
5bacd34fb2
1 changed files with 5 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
||||||
import { NextApiRequest, NextApiResponse } from "next";
|
import { NextApiRequest, NextApiResponse } from 'next';
|
||||||
|
|
||||||
export default async function ip(req: NextApiRequest, res: NextApiResponse){
|
export default async function ip(req: NextApiRequest, res: NextApiResponse){
|
||||||
let ip = req.headers['cf-connecting-ip']
|
let cf = req.headers['cf-connecting-ip'];
|
||||||
res.json({ ip: ip });
|
let xff = req.headers['x-forwarded-for'];
|
||||||
|
let xri = req.headers['x-real-ip'];
|
||||||
|
res.status(200).json({ cf: cf, xff: xff, xri: xri });
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue