Variable reference
| Variable | Required | Default | Description |
|---|---|---|---|
UPSTASH_REDIS_REST_URL | Yes | — | Upstash Redis REST endpoint URL |
UPSTASH_REDIS_REST_TOKEN | Yes | — | Upstash Redis REST auth token |
GOOGLE_SAFE_API_KEY | No | — | Google Safe Browsing API v4 key. If missing, the checker logs an error and returns score 0. |
PHISHTANK_API_URL | No | https://data.phishtank.com/data/online-valid.csv.gz | Override the PhishTank feed URL. The default streams the compressed CSV dump. |
PORT | No | 4000 | HTTP port the server listens on. |
SCAN_CACHE_SAFE_RESULTS | No | false | Set to "true" to cache safe verdict results in Redis. Disabled by default to reduce Redis storage. |
WEBRISK_API_KEY | No | — | Google Web Risk API key. Used by the WebRiskChecker, which is present in source (src/checkers/googleWebRisk.ts) but currently disabled and not registered in the checker pipeline. |
Example .env file
If
GOOGLE_SAFE_API_KEY is not set, checkSafeBrowsing logs "safe browsing key missing" to stderr and returns { score: 0 }. The server continues to operate normally — the Google Safe Browsing checker is simply skipped.