A Cloudflare Worker that tells the user whether their traffic is currently flowing through the Requestly desktop proxy.
The Requestly desktop proxy injects an amiusingrequestly: true request header on every outbound request to amiusing.requestly.io. This Worker reads that header on receipt and returns one of two inline pages:
success.html— shown when the header is present (i.e. the user IS being proxied).failure.html— shown otherwise.
npm install
npx wrangler devThen in another terminal:
# No header → No page
curl -i http://127.0.0.1:8787/
# With header → Yes page
curl -i -H 'amiusingrequestly: true' http://127.0.0.1:8787/One-time setup:
npx wrangler loginStaging (before cutover):
npm run deploy:stagingProduction:
npm run deployRoutes are configured per-deploy via the --route flag in the npm scripts (see package.json). Adjust wrangler.toml if you prefer to pin routes there.
For HTTP to work end-to-end (the proxy-test docs reference http://amiusing.requestly.io because the desktop proxy MITM only works over HTTPS once the Requestly CA is trusted), the following must be set on the amiusing.requestly.io hostname in Cloudflare:
- Configuration Rule scoped to
amiusing.requestly.io:Always Use HTTPS = Off. - HSTS not enabled for this hostname. The Worker also emits
Strict-Transport-Security: max-age=0as belt-and-suspenders.
The site-wide HTTPS setting on requestly.io stays untouched.
Every response from the Worker sets:
content-type: text/html; charset=utf-8cache-control: no-store— a cached "No" must not survive a later interception.strict-transport-security: max-age=0— keephttp://from being auto-upgraded.