Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Plugin not required #1

Open
lukeyouell opened this issue Aug 9, 2018 · 0 comments
Open

Plugin not required #1

lukeyouell opened this issue Aug 9, 2018 · 0 comments

Comments

@lukeyouell
Copy link

I don't mean to be a stickler, but I thought it was worth mentioning that this functionality doesn't require a plugin.

You can access headers with Twig, which means you can fetch the Cloudflare IP Geolocation header value like this:

{% set country = craft.app.request.headers.get('CF-IPCountry') %}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant