Skip to content

Conversation

strahe
Copy link
Contributor

@strahe strahe commented Sep 12, 2025

Fixes CORS preflight OPTIONS requests returning 404 for API endpoints.

The previous CORS middleware in #629 worked fine for registered routes, but I missed that OPTIONS requests were hitting 404 before the middleware could handle them. This happens because Gorilla Mux returns 404 when no route matches the HTTP method.

Added a catch-all OPTIONS handler so all API endpoints can receive CORS preflight requests properly.

My bad for not testing this thoroughly in the first PR!

@strahe strahe requested a review from a team as a code owner September 12, 2025 09:45
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