Cloudflare Access Issue with custom domain
I'm encountering an issue with Cloudflare Access on my Cloudflare Pages build with a custom domain. Here's the situation:
I have a Cloudflare Pages build with a custom domain.
Both the custom domain and pages_dev sites are protected via Cloudflare Access.
In the page, I'm using the header "cf-access-authenticated-user-email" for user detection.
The problem is, everything works fine on the pages_dev sites; the header is present. However, on the custom domain, the "cf-access-authenticated-user-email" header is missing.
Has anyone else experienced this or have any ideas on how to resolve it? Any help would be greatly appreciated!
Thanks in advance! 🙏
1 Reply
Ok, I found the solution.
--> decode the JWT Header "cf-access-jwt-assertion"