cloudflare-apps / ideas

A list of Cloudflare App Ideas (in Issues)
https://www.cloudflare.com/apps/developer/docs/getting-started
43 stars 12 forks source link

Inject arbitrary HTTP headers #258

Open ithinkihaveacat opened 7 years ago

ithinkihaveacat commented 7 years ago

One specific example is an origin-trial header, as used by Chrome.

Jos512 commented 7 years ago

Good idea! And this would be a reason to develop an app (and I'd very much like to have this feature in Cloudflare). But after reading through the documentation I doubt if this is possible.

Adding custom HTTP headers requires the app to run before the page loads, which doesn't seem to be possible given the features outline in the docs. It also contradicts the definition of what a Cloudflare App is:

At its core a Cloudflare app is set of JavaScript and/or CSS files which run on a website, and an install.json file which instructs tools like Cloudflare Apps how to use those files.

Source (bold added).

To add HTTP headers to request, at the minimum the app needs to do:

I of course hope I'm mistaken, but none of these things seem possible (at this point).

radiusops commented 6 years ago

Thank you very much for this Good Idea. Its really easy to understand language you have used here. Lot of information for the beginners. This will help me a lot for HTTP header on my website. Keep on writing and share your knowledge for the beginners.

All the Best Alam Freelancer

matthewoates commented 5 years ago

This is now possible with Cloudflare Workers. https://www.cloudflare.com/products/cloudflare-workers/