Documentation
Geolocating Requests
Projects running via Servd's Ingress Platform automatically include Cloudflare geolocation headers in inbound requests. These can be read by your project's code to geolocate your site's visitors.
You can verify these headers are coming through by visiting your project's PHP Info Utilities page in your Craft control panel. You should see the following headers (in SCREAMING_SNAKE_CASE format):
- CF-IPLatitude
- CF-IPLongitude
- CF-IPCity
- CF-IPCountry
- CF-Postal-Code
- CF-Region-Code
- CF-Region
- CF-Continent
- CF-Timezone
- CF-ConnectingIP
We'd recommend using these headers over the Geomate plugin, as it avoids you having to manually maintain a local geolocation database. In addition, Cloudflare's geolocation data is continually updated, so is more likely to be up-to-date and accurate.