Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 973 Bytes

2024-09-24-redirects-middleware.md

File metadata and controls

21 lines (16 loc) · 973 Bytes

Redirects middleware

Previous decision was to use Cloudflare Pages to handle redirects. An upgrade to Cloudflare adapter broke this implementation. Using middleware is more reliable and removes Cloudflare lock-in.

Decision

Middleware for redirects

Middleware is unit-tested and has no dependencies on external services.

Astro redirects

Astro also offers functionality to handle redirects: Astro redirects. However Astro redirects do not support wildcards and the redirect destination in Astro redirects configuration requires knowledge of the avalable file-based routes in the code base which content editors in the CMS don't have.