The intel relay
Optional. Everything else in the workbench works without it.
The workbench's Endpoint tier can look an artifact up with seven intel providers. Four of them cannot be called from a browser at all. This page is the small proxy that fixes that, and the reasons to think before you run one.
Download the Worker script → cloudflare-worker.js — one file, plain JavaScript, no dependencies. Read it before you deploy it; it is about 400 lines.1. Why it exists
Three of the seven providers answer browsers directly, so the workbench calls them itself: RDAP, DNS over HTTPS and the NVD.
The other four — VirusTotal, AbuseIPDB,
urlscan.io and GreyNoise — send no
Access-Control-Allow-Origin header. A browser will happily make
the request and then refuse to let the page read the answer. That is not
something the app can work around: CORS is the vendor's decision, not ours.
So the workbench routes those four through a relay you run. The relay adds the header the vendor omits, and nothing else. With no relay configured, those four providers' buttons stay disabled and say why.
2. What it forwards
The app builds the vendor URL, then rewrites it onto your relay:
${relayBase}/${providerId}/<vendor path>?<vendor query>
The Worker maps the first path segment to a vendor origin and forwards the rest byte for byte:
| Provider id | Vendor base | Key header |
|---|---|---|
virustotal | https://www.virustotal.com | x-apikey |
abuseipdb | https://api.abuseipdb.com | Key |
urlscan | https://urlscan.io | API-Key |
greynoise | https://api.greynoise.io | key |
So
GET https://relay.example.org/abuseipdb/api/v2/check?ipAddress=1.1.1.1&maxAgeInDays=90
becomes
GET https://api.abuseipdb.com/api/v2/check?ipAddress=1.1.1.1&maxAgeInDays=90.
What the Worker does, and only this:
- forwards GET only — every other method gets
405; - forwards the path and query unchanged, as long as the
path starts with the one prefix that provider's endpoint lives under.
Another endpoint,
..,%2eor an empty path segment gets403and never reaches the vendor; - forwards one request header, the vendor's API key header
from the table above, and sets its own
Accept: application/json. Every other header the browser sent — cookies,Referer,User-Agent, the lot — is dropped; - answers the
OPTIONSpreflight; - adds
Access-Control-Allow-Originfor a single configured origin, and refuses anything from another origin — or with noOriginat all — with403; - refuses any other provider id with
404; - never follows a redirect: a
3xxfrom a vendor is answered502, so a request carrying your key cannot be pointed somewhere else; - caps the vendor's reply at 2 MB;
- answers
Content-Type: application/json; charset=utf-8whatever the vendor said, withX-Content-Type-Options: nosniffandContent-Security-Policy: default-src 'none'; - sets
Cache-Control: no-storeon everything it returns; - never logs anything — no request line, no artifact value, no key.
The path prefix allowed per provider:
| Provider id | Path prefix |
|---|---|
virustotal | /api/v3/ |
abuseipdb | /api/v2/check |
urlscan | /api/v1/search/ |
greynoise | /v3/community/ |
3. Deploy it in five minutes, on the free tier
With wrangler
mkdir cyberchef-relay && cd cyberchef-relay # put the downloaded script here as cloudflare-worker.js cat > wrangler.toml <<'TOML' name = "cyberchef-relay" main = "cloudflare-worker.js" compatibility_date = "2024-09-23" [vars] ALLOWED_ORIGIN = "https://cyberchef.tools" TOML npx wrangler secret put RELAY_TOKEN # paste e.g. `openssl rand -hex 32` npx wrangler deploy
RELAY_TOKEN is not optional. Unless
ALLOWED_ORIGIN is explicitly "*", a relay without
one refuses every request with 500 and a line telling you to
set it. Section 6 says why.
Wrangler prints a URL like
https://cyberchef-relay.<your-subdomain>.workers.dev. That
is your relay base.
Or paste it into the Cloudflare dashboard
- Dashboard → Workers & Pages → Create → Start with Hello World → Deploy.
- Edit code, select everything in the editor, paste the whole downloaded script over it, Deploy.
- Settings → Variables and Secrets → add
ALLOWED_ORIGINwith your site's origin, and addRELAY_TOKENas a secret with a long random string. - Copy the Worker's URL from the overview page.
Either way, check it answers:
curl -s -o /dev/null -w '%{http_code}\n' \
-H 'Origin: https://cyberchef.tools' \
-H 'X-Relay-Token: the-token-you-set' \
'https://cyberchef-relay.example.workers.dev/greynoise/v3/community/1.1.1.1'
# 401 from GreyNoise means the relay works and your key is simply not attached yet
# 500 means RELAY_TOKEN is not set; 401 from the relay itself means it does not match
Drop the Origin header and the same request is
403: the relay answers browsers on the one origin you
configured, and nothing else.
4. Point the app at it
In the app: Tools › Intel › Endpoint tier.
- Switch on “Allow Endpoint lookups with my own API keys”.
- Paste your Worker URL into Relay base URL. A trailing slash does not matter.
- Paste each vendor's API key into its row.
- Press a row's Test button. A summary line means it works.
5. Configuration
| Setting | Where | Default |
|---|---|---|
ALLOWED_ORIGIN |
[vars] in wrangler.toml, or the dashboard,
or the ALLOWED_ORIGIN constant at the top of the script |
https://cyberchef.tools |
RELAY_TOKEN |
a Worker secret
(npx wrangler secret put RELAY_TOKEN), or the dashboard,
or the RELAY_TOKEN constant |
empty — and required unless
ALLOWED_ORIGIN is "*" |
The environment variable always wins over the constant in the file, so you can deploy the script unchanged and configure it from the dashboard.
Running the app from a local dev server? Set ALLOWED_ORIGIN to
http://localhost:8080. Set it to "*" only for a
relay that is not reachable from the internet — a * relay is an
open proxy to four vendor APIs.
6. The shared secret
A relay on a workers.dev URL is reachable by anyone who finds
the URL. They cannot use your API keys — those live in your browser
and travel on each request — but they can spend your Worker's request quota.
ALLOWED_ORIGIN does not stop them: only a browser is bound by
it, and anything else simply sends the Origin you configured,
or none at all.
So the token is required. Set RELAY_TOKEN to a long random
string and the Worker rejects every request without a matching
X-Relay-Token header with 401:
npx wrangler secret put RELAY_TOKEN # paste e.g. `openssl rand -hex 32`
Then put the same value in Tools › Intel › Relay token. The
app keeps it in this browser's localStorage next to the relay base, and
sends it as X-Relay-Token on relayed requests only — never to a
vendor, and never to anything but the relay you configured.
It is a quota lock, not an authentication system: anyone who can read your browser profile can read it, the same as your API keys.
The one deployment that may run without it is
ALLOWED_ORIGIN = "*", which the Worker reads as a deliberate
statement that the relay is not reachable from the public internet — a
container on a laptop, say. Set it to "*" on anything the
internet can reach and you have published an open proxy to four vendor
APIs.
7. Privacy
Whoever runs the relay sees the lookups. Every relayed request carries the artifact you looked up in its URL and your API key in a header, and the relay sees both, along with the IP address they came from. This Worker logs nothing and stores nothing — but an operator can change that, and the platform it runs on sees the traffic either way.
That is why this site ships no relay and offers no default relay address: run your own. Do not point the workbench at a relay somebody else operates unless you would hand that person the artifacts and the keys directly, because that is what you would be doing.
Once a request leaves the relay it is the vendor's, under the vendor's own privacy policy. Section 3 of the privacy policy sets out the whole picture.
8. Somewhere other than Cloudflare
The script is plain ES-module JavaScript against the standard
fetch, Request, Response,
URL and Headers APIs, and its entry point is
export default { fetch } — which is what Deno Deploy and Bun
expect too. It imports cleanly into Node 18 and later, so you can test it
against a stubbed fetch before you put it anywhere.