https://github.com/fixthestatusquo/ipgeolocation
Based on the IP address of the visitor, it returns the country
https://github.com/fixthestatusquo/ipgeolocation
cloudflare cloudflare-worker ipgeolocation
Last synced: 2 months ago
JSON representation
Based on the IP address of the visitor, it returns the country
- Host: GitHub
- URL: https://github.com/fixthestatusquo/ipgeolocation
- Owner: fixthestatusquo
- License: agpl-3.0
- Created: 2020-07-30T15:30:19.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-08-12T18:00:06.000Z (almost 3 years ago)
- Last Synced: 2025-05-24T17:41:22.226Z (about 1 year ago)
- Topics: cloudflare, cloudflare-worker, ipgeolocation
- Language: JavaScript
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# ipgeolocation cloudlfare worker
Based on the IP address of the visitor, it returns the country.
If you have a paid cloudflare account, you will be able to retrieve more specific geo information (eg the state in the US).
TODO: find someone that wants to code it or throw the 5$/month in my general direction so I can make it happen
[`index.js`](https://github.com/cloudflare/worker-template/blob/master/index.js) is the content of the Workers script.
## to deploy
If you aren't familiar with workers or wrangler, check the doc from cloudflare, it's quite clear.
1. cp wrangler.example.toml wrangle.toml
2. fill the missing information about your cloudflare account
3. wrangler publish
Further documentation for Wrangler can be found [here](https://developers.cloudflare.com/workers/tooling/wrangler).