FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
mattrossman
mattrossmanip
Public
Like
ip
Home
Code
2
README.md
H
main.ts
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
main.ts
https://mattrossman--05cab00047fa11f0a27676b3cceeab13.web.val.run
README.md

ip

A helper function to read a visitor's IP address from x-forwarded-for headers.

Create val
import { getIp } from "https://esm.town/v/mattrossman/ip/main.ts"; export default async function (req: Request) { const ip = await getIp(req); return new Response(`Your IP address is ${ip}`); }
HTTP
  • main.ts
    mattrossman--05…13.web.val.run
Code
README.md
H
main.ts
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.