© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•4y ago•
4 replies
salad

Get request headers from received request in fetch event.

I am trying to get the headers of received requests, but end up getting null for the following code:
export default {
    async fetch(request, env, ctx) {
        console.log(JSON.stringify(request.headers));
    }
}
export default {
    async fetch(request, env, ctx) {
        console.log(JSON.stringify(request.headers));
    }
}
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

403 from a fetch request from a Worker
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3mo ago
HTTP Fetch Request
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago