Abstract


Access & Manipulate HTTP Headers with curl

Inspect the HTTP Headers with curl

curl -v <\ENDPOINT\>
  • Lines beginning with > indicate request headers
  • Lines beginning with < indicate response headers
  • Lines beginning with * indicate additional information about the connection and transfer

Set HTTP Header with curl

curl -H "ngrok-skip-browser-warning: anyValue" <\ENDPOINT\>

Content-Type


Example

With content-type: application/pdf, browser is able to open an in-browser pdf reader.

Cache-Control


  • Tells the Client how long it can use the cached copy of the resources (can be css and js files etc) before it fetches a new copy from Server

Example

With cache-control: public, max-age=7200, must-revalidate, the client must re-fetch a new copy from the server after 7200 seconds.

Adjust Cache-Control Value with Cloudflare

Adjust the value for all websites managed by Cloudflare using Cloudflare Caching Configuration

Adjust the value for a specific website managed by Cloudflare using Cloudflare Cache Rules