Skip to content

Migrate from Cloudflare Pages to Vercel and remove Cloudflare dependencies - #20

Merged
NX1X merged 3 commits into
mainfrom
migrate/vercel
Sep 6, 2026
Merged

Migrate from Cloudflare Pages to Vercel and remove Cloudflare dependencies#20
NX1X merged 3 commits into
mainfrom
migrate/vercel

Conversation

@NX1X

@NX1X NX1X commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Migrates hosting from Cloudflare Pages to Vercel, and removes every remaining Cloudflare-origin runtime dependency (not just hosting). The site is no longer connected to any Cloudflare product.

  • vercel.json translates public/_headers, preserving the deliberate must-revalidate caching on app.js/style.css/manifest.json (a long max-age on those unfingerprinted files previously froze a stale build at the edge for a year)
  • Self-hosted pdf.js 3.11.174 and SheetJS 0.18.5 under public/vendor/, downloaded from npm's registry and verified byte-for-byte against npm's own signed sha512 integrity metadata before extracting. Updates index.html, app.js's workerSrc, and sw.js's cache list; SRI attributes dropped since the files are same-origin now
  • Removed Cloudflare Turnstile entirely. It had no server-side siteverify anywhere in the repo, so it was pure client-side friction with zero security value. Removes the script loader, the verification gate in processFile (renamed processPDFAfterVerification to processPDF), the widget markup, its CSS, and the unused security-verification i18n strings
  • Added Vercel Analytics; the footer already claimed "anonymous usage analytics" with no beacon actually present anywhere in the repo, so this also makes that claim true rather than just relabeling it
  • _worker.js, _headers, _redirects, .cfignore deleted
  • scripts/check-cdn-versions.sh rewritten to verify the vendored files are present and consistently referenced (there is no longer a cdnjs version path to check); the now-dead Renovate custom manager and its cdnjs packageRule are removed
  • README.md's tech stack, layout, security, and deployment sections rewritten for Vercel

Known tradeoff, flagged for a decision

Vendoring pdf.js and SheetJS means losing Renovate's automated upstream update tracking for them. The CI check still catches drift between the three files that reference them, but won't tell you when a new upstream version ships. Accept that, or add them as npm dependencies with a small build step to keep tracking — open question.

Verification done

  • Served locally: PDF upload and conversion works end-to-end with no Turnstile step
  • Vendored libraries load with zero requests to any *.cloudflare.com host
  • check-version-sync.sh and the rewritten check-cdn-versions.sh both pass
  • No remaining Cloudflare/cdnjs/Turnstile references outside CHANGELOG history

NX1X added 2 commits September 6, 2026 12:26
…ncies

- Add vercel.json translating _headers (preserving the deliberate
  must-revalidate caching on app.js/style.css/manifest.json)
- Self-host pdf.js 3.11.174 and SheetJS 0.18.5 under public/vendor/,
  verified against npm's published sha512 integrity before extracting.
  Updates index.html, app.js's workerSrc, and sw.js's cache list; drops
  SRI attributes since the files are now same-origin
- Remove Cloudflare Turnstile entirely: it had no server-side
  verification anywhere, so it was pure client-side friction. Removes
  the script loader, the verification gate in processFile (renamed
  processPDFAfterVerification to processPDF), the widget markup, its
  CSS, and the unused security-verification i18n strings
- Add Vercel Analytics; the footer already claimed 'anonymous usage
  analytics' with no beacon actually present, so this also makes that
  claim true rather than just renaming it
- Delete _worker.js, _headers, _redirects, .cfignore
- Rewrite check-cdn-versions.sh: verifies the vendored files exist and
  are referenced consistently, since there is no longer a cdnjs version
  path to check. Remove the now-dead Renovate custom manager and its
  cdnjs packageRule (this does mean losing automated upstream update
  tracking for pdf.js and SheetJS; the CI check still catches drift
  between the three files that reference them)
- Rewrite README.md's tech stack, layout, security and deployment
  sections for Vercel
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: e009f712-acee-4ca0-b4f0-4cb88b07aeca


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@NX1X
NX1X merged commit 74f6058 into main Sep 6, 2026
9 checks passed
@NX1X
NX1X deleted the migrate/vercel branch September 6, 2026 11:05
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.

1 participant