Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloudflare Driver #120

Merged
merged 1 commit into from
Dec 30, 2022
Merged

Cloudflare Driver #120

merged 1 commit into from
Dec 30, 2022

Conversation

nik-418
Copy link
Contributor

@nik-418 nik-418 commented Dec 21, 2022

This PR adds support for Cloudflare as a built-in driver.

If your domain is behind Cloudflare's nameservers, you get geolocation for free in one of two ways: https://support.cloudflare.com/hc/en-us/articles/200168236-Configuring-IP-geolocation

  1. You can enable it in the dashboard, which will add a cf-ipcountry header to all incoming requests.
  2. Or you can add a Managed Transform, which will add cf-ipcountry, cf-ipcity, cf-iplongitude, and cf-iplatitude headers.

This means that you can get (limited) geolocation data without any additional API calls or local database lookups if this is enough for your use case.

@nik-418 nik-418 force-pushed the cloudflare branch 5 times, most recently from 992bcf4 to 55e558e Compare December 21, 2022 19:12
style fix

useless import

xx and t1

style fix

readme

unused var
@stevebauman stevebauman merged commit 10f9e40 into stevebauman:master Dec 30, 2022
@stevebauman
Copy link
Owner

Thanks @nik-418! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants