- Fixes Vercel deployment by pinning to 20.x
- Refactors console outputs into logger.js
- Fixes sections still visible when no data (Server Info)
- Fixes checks still show error after fallback succeeds (Screenshot)
- Updates client-side env var names, from `REACT_APP_` to `PUBLIC_`
- Sitemap endpoint now recursively expands sitemap-index files
- Fixes#165
- Strips :port from target URLs in get-ip, dns, dns-server, ports, mail-config
- Fixes#203
- Configurable trust proxy (TRUST_PROXY env) so app works behind Traefik/nginx
- Fixes#157
- Tranco rank now correctly says "top 1 million" (was "100 million")
- Fixes#257
- Adds engines.node ">=20" so Vercel picks a supported runtime
- Re #212
- Raises Vercel maxDuration from 10s to 60s, cutting most 504 timeouts
- Re #251
- Re #287
- Bumps axios 1.4.8 to 1.16, closing 4 high-severity SSRF/DoS CVEs
- Re #289
- Fixes mail-config crash where dns module was awaited as if promise-based
- Adds reusable structured logging util for the API
- Bumps a whole bunch of deps, and resolves lots of open npm CVEs
When the WebsiteCarbon API is protected by Cloudflare and requests
originate from datacenter IPs, Cloudflare may return an HTML challenge
page instead of JSON. This caused JSON.parse() to throw an uncaught
SyntaxError exception, crashing the entire application.
This fix:
- Checks if the response starts with HTML markers before parsing
- Wraps JSON.parse in try-catch for additional safety
- Returns a descriptive error message instead of crashing
Fixes#268
Checks if the env PORTS_TO_CHECK is set, if so the string is split via "," to get an array of ports to check.
If the env is not set, return the default commonly used ports.