Skip to content

fix(giscus): use worker script for CORS headers#36

Merged
CalvinAllen merged 5 commits into
mainfrom
fix/giscus/cors-headers
Jan 8, 2026
Merged

fix(giscus): use worker script for CORS headers#36
CalvinAllen merged 5 commits into
mainfrom
fix/giscus/cors-headers

Conversation

@CalvinAllen

Copy link
Copy Markdown
Collaborator

Summary

The _headers file doesn't work with Cloudflare Workers (only Pages). This adds a worker script to serve the giscus-theme.css with the proper CORS header.

Changes

  • Remove _headers file (not supported by Workers)
  • Add src/worker.ts to handle CORS for giscus theme
  • Update wrangler.toml to use the worker script

Test plan

  • Verify giscus custom theme loads without CORS error
  • Verify other assets still load correctly

Also show bluesky engagement sections with 0 counts instead of hiding them
Cloudflare Workers doesn't support _headers file. Added a worker
script to add CORS header for giscus-theme.css.
@CalvinAllen CalvinAllen merged commit e5f07ee into main Jan 8, 2026
2 checks passed
@CalvinAllen CalvinAllen deleted the fix/giscus/cors-headers branch January 8, 2026 22:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant