Files

17 lines
847 B
Markdown

# costco-watch image
Dependency-free Node service (node:22-alpine + curl for the healthcheck).
Source: https://git.alexzaw.dev/alexz/costco-watch (working copy:
~/projects/costco-watch). Build + push with ./build.sh.
Gotchas:
- Costco stalls (no response, just a hang) on requests lacking Sec-Fetch-*
headers. watch.js sends a browser header set in BROWSER_HEADERS - do not
strip it. Any single Sec-Fetch-* header is sufficient; UA/Accept alone are
not. Cloudflare Transform Rules CANNOT substitute for this: Sec-* headers are
on Cloudflare's restricted list, and cloudflared can't add headers at all.
- TARGET_URL goes through the costco-tire cloudflared ingress, which sets
httpHostHeader: tires.costco.com.
- State (last stock value, transition history) lives in ${APP_DATA_DIR}/data;
wiping it means the next check can re-alert.