Skip to content

Commit b0beaa2

Browse files
committed
Explain Cloudflare (#45)
1 parent 0a3b41a commit b0beaa2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,15 @@ docker run -d -p 3000:3000 -e ACCOUNT_ID=YOUR_MAXMIND_ACCOUNT_ID -e LICENSE_KEY=
5959

6060
Replace `YOUR_MAXMIND_ACCOUNT_ID` and `YOUR_LICENSE_KEY` with your MaxMind account ID and the license key associated with it.
6161

62+
### Cloudflare Integration
63+
64+
To improve performance, deploy behind [Cloudflare][cloudflare]:
65+
66+
1. Point your domain to Cloudflare's nameservers
67+
2. Enable Cloudflare proxying for your API endpoint (click the cloud icon next to your DNS record until it turns orange)
68+
69+
When deployed with Cloudflare, the API will automatically use Cloudflare's geolocation data as the primary source, falling back to MaxMind when needed.
70+
6271
[free-instance]: https://api.country.is
6372
[action]: https://github.com/lineofflight/country/actions
73+
[cloudflare]: https://www.cloudflare.com

0 commit comments

Comments
 (0)