Skip to content

fix(api): support HEAD requests#11

Merged
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/api-head-and-deploy-trigger
May 19, 2026
Merged

fix(api): support HEAD requests#11
caio-pizzol merged 1 commit into
mainfrom
caio-pizzol/api-head-and-deploy-trigger

Conversation

@caio-pizzol

Copy link
Copy Markdown
Contributor

Summary

  • allow API HEAD requests and advertise GET, HEAD, OPTIONS in CORS headers
  • return cheap no-body HEAD responses for /stats, /documents, /manifest, and unknown routes without running expensive DB-backed GET handlers
  • share manifest filename/header construction between HEAD /manifest and GET /manifest
  • include .github/workflows/deploy-site.yml in the site deploy path filter so workflow-only deploy fixes trigger automatically

Verification

  • git diff --check
  • bun run lint
  • bun run typecheck
  • bun run test
  • bun run build
  • bun run --cwd apps/web typecheck (0 errors, existing Astro hints only)
  • bun run --cwd apps/web/worker deploy --dry-run
  • local runtime dispatch smoke for HEAD /stats, HEAD /documents, HEAD /manifest, HEAD /missing, OPTIONS /stats, and POST /stats

Note

Direct tsc --noEmit -p apps/web/worker/tsconfig.json is not currently a useful gate: installing the worker package exposes pre-existing Cloudflare Workers vs Node global type conflicts plus older Neon row typing issues in untouched code. Wrangler dry-run verifies the worker bundle path used for deploy.

@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit 4399cb5 into main May 19, 2026
2 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/api-head-and-deploy-trigger branch May 19, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants