Skip to content

Conversation

sjoerdbeentjes
Copy link
Contributor

  • Introduced a new middleware to apply headers from the _headers file to dynamic responses.
  • Implemented header rules parsing logic to support global and specific headers, including placeholder substitution.
  • Added tests to ensure correct application of headers based on defined rules.

- Introduced a new middleware to apply headers from the _headers file to dynamic responses.
- Implemented header rules parsing logic to support global and specific headers, including placeholder substitution.
- Added tests to ensure correct application of headers based on defined rules.
Copy link

cloudflare-workers-and-pages bot commented Jul 9, 2025

Deploying dda-website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3ec0258
Status: ✅  Deploy successful!
Preview URL: https://f15910a7.dda-website.pages.dev
Branch Preview URL: https://dynamic-page-headers.dda-website.pages.dev

View logs

- Replace file system read with direct import of _headers content for improved performance and simplicity.
- Remove unnecessary file path handling in the header parsing function.
- Changed the mock implementation in headers.test.ts to use a raw import of the _headers content instead of mocking the fs module.
- This adjustment simplifies the test setup and aligns with recent refactoring of header parsing.
@sjoerdbeentjes sjoerdbeentjes merged commit 6b4d8f1 into main Jul 9, 2025
4 of 5 checks passed
@sjoerdbeentjes sjoerdbeentjes deleted the dynamic-page-headers branch July 9, 2025 12:38
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