Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
at main 18 lines 356 B view raw
1import type { Context } from "hono"; 2 3interface IpData { 4 city: string; 5 countryCode: string; 6 region: string; 7} 8 9const getIpData = (ctx: Context): IpData => { 10 const h = (name: string) => ctx.req.header(name) ?? ""; 11 return { 12 city: h("cf-ipcity"), 13 countryCode: h("cf-ipcountry"), 14 region: h("cf-region") 15 }; 16}; 17 18export default getIpData;