mirror of
https://github.com/skidoodle/albert.lol.git
synced 2025-02-15 06:09:15 +01:00
ip api test 2
This commit is contained in:
parent
af549fa168
commit
bcc7e84db7
1 changed files with 1 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
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){
|
||||||
const ip = (req.headers['x-forwarded-for' || 'x-vercel-forwarded-for']);
|
let ip = req.headers['cf-connecting-ip']
|
||||||
res.json({ ip: ip });
|
res.json({ ip: ip });
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue