A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.cloudflare.com/rules/snippets/examples/hex-timestamp/ below:

Add HEX timestamp to a request header · Cloudflare Rules docs

// Get the current timestamp

const timestamp = Date.now();

// Convert the timestamp to hexadecimal format

const hexTimestamp = timestamp.toString(16);

// Clone the request and add the custom header

const modifiedRequest = new Request(request, {

headers: new Headers(request.headers)

modifiedRequest.headers.set("X-Hex-Timestamp", hexTimestamp);

// Log the custom header for debugging

console.log(`X-Hex-Timestamp: ${hexTimestamp}`);

// Pass the modified request to the origin

const response = await fetch(modifiedRequest);


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4