Skip to content

redirect2me/cfw-geolocation

Repository files navigation

Cloudflare Workers Geolocation Geolocation logo

Server that determines your physical location by looking at headers sent to Cloudflare Workers functions.

Try it with: Cloudflare Workers

Also see a more detailed comparison of geolocation providers

How it works

This application is just a simple app that shows various values from Cloudflare's IncomingRequestCfProperties object which they add to the request object under the cf property.

Running it yourself

It is a trivial TypeScript application. See run.sh for how I run it in development.

LATER

Contributions

Contributions are welcome! If you know of any other similar CDNs/services, let me know & I will add them in!

API

There is a simple JSON/JSONP API that is free for light, non-commercial use. This is such a trivial application that you should run your own copy (or make your own version) for anything serious. Cloudflare has a generous free plan (which is what I'm using).

Send a callback parameter to get JSONP instead of JSON.

License

GNU Affero General Public License v3.0

Credits

Cloudflare Git Github NodePing npm svgrepo TypeScript VectorLogoZone water.css

About

Geolocation with Cloudflare Workers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published