Is it possible to access requests headers in Pages' functions?
I was trying to access
context.request.headers
but it's always empty...
I'm performing API requests via postman sending custom headers but so far nothing shows up in the response. Here's my code:
In additon is it possible to get the CF's headers for country and IP in these functions? I know on CF DNS management they do set some CF headers that are attached to the request so you can retrieve the IP and country from these for each visit, I would like to see if I can do the same in CF page functions.3 Replies
bump!
Cloudflare Docs
Conditional response · Cloudflare Workers docs
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones …
thank you @Evil Morty that worked 👍