Skip to content

fix: use-proxy-api-url-version-endpoint#6743

Merged
Zaimwa9 merged 2 commits into
mainfrom
fix/proxy-url-prevents-frontend-from-reading-api-version
Feb 25, 2026
Merged

fix: use-proxy-api-url-version-endpoint#6743
Zaimwa9 merged 2 commits into
mainfrom
fix/proxy-url-prevents-frontend-from-reading-api-version

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Feb 20, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Closes #6588

Frontend was only handling api/v1/* when proxying traffic with FLAGSMITH_PROXY_API_URL while version lives at the root, causing the frontend to hit its own /version, ignoring is_enterprise and is_saas in deployments

  • Add /version in proxied paths when FLAGSMITH_PROXY_API_URL is set
  • Renamed FE version endpoint to /_frontend_version to avoid conflicts
  • Update useBuildVersion to use /_frontend_version

How did you test this code?

  • Start a flagsmith api via docker

  • in frontend start the server FLAGSMITH_PROXY_API_URL=http://localhost:8000 ENV=local npm run dev
    Run:

    • curl http://localhost:8080/_backend_version → response includes is_enterprise, is_saas (fetched from the API)
    • curl http://localhost:8080/version → returns frontend version (ci_commit_sha, image_tag)

    Go to http://localhost:8080 in the browser and verify:

    • Organisation Settings correctly shows licensing tab (based on is_enterprise)
    • The version tag in the UI shows the API version andnot Unknown

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner February 20, 2026 17:42
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team February 20, 2026 17:42
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Feb 24, 2026 6:03pm
flagsmith-frontend-staging Ready Ready Preview, Comment Feb 24, 2026 6:03pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Feb 24, 2026 6:03pm

Request Review

@github-actions github-actions Bot added front-end Issue related to the React Front End Dashboard fix labels Feb 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 20, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6743 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith:pr-6743 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-e2e:pr-6743 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6743 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6743 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6743 Finished ✅ Results

@Zaimwa9 Zaimwa9 changed the title fix: pruse-proxy-api-url-version-endpoint fix: use-proxy-api-url-version-endpoint Feb 23, 2026
Comment thread frontend/api/index.js Outdated
@Zaimwa9 Zaimwa9 merged commit 064b4bb into main Feb 25, 2026
27 checks passed
@Zaimwa9 Zaimwa9 deleted the fix/proxy-url-prevents-frontend-from-reading-api-version branch February 25, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using FLAGSMITH_API_PROXY_URL prevents the FE from reading the API /version endpoint

2 participants