Skip to content

Conversation

markphelps
Copy link
Contributor

No description provided.

- Update worker to proxy requests to flipt.mintlify.app backend
- Fix redirect loop issue where root was redirecting to /v1/v2
- Ensure versioned paths and static assets proxy to correct backend

Signed-off-by: Mark Phelps <[email protected]>
The regex was only matching paths with trailing slashes like /v1/ and /v2/
but the redirect from root goes to /v2 without trailing slash, causing it
to not be recognized as versioned and getting /v1 prepended, creating /v1/v2

Updated regex from /^\/v[12]\// to /^\/v[12](\/|$)/ to match both:
- /v1 and /v2 (without trailing slash)
- /v1/ and /v2/ (with trailing slash)
- /v1/foo and /v2/bar (with subpaths)

Signed-off-by: Mark Phelps <[email protected]>
@markphelps markphelps requested a review from a team as a code owner September 28, 2025 17:17
@markphelps markphelps merged commit 291d197 into main Sep 28, 2025
3 of 4 checks passed
@markphelps markphelps deleted the fix-cloudflare-redirect-loop branch September 28, 2025 17:20
markphelps added a commit that referenced this pull request Sep 28, 2025
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