M8F-56: Fix local development issue by updating Vite host and backend proxy configuration#72
Merged
auslin-aot merged 2 commits intoAOT-Technologies:mainfrom Mar 16, 2026
Conversation
…figurable `backendUrl` from environment variables, and use it for API proxy targets.
abilpraju-aot
approved these changes
Mar 11, 2026
…ions and comments in vite.config.ts.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



JIRA Ticket
M8F-56
Description
Fix infinite login redirect loop when running frontend locally via
npm start.Problem
The Vite dev server proxy in
extensions/frontend/vite.config.tshad the backendproxy target hardcoded to
http://localhost:8000. When the backend runs on anon-localhost IP (e.g.,
http://192.168.1.77:8000), all proxied API requests(
/v1.0/*) were sent to the wrong host, causing every call to fail with aconnection error →
401 Unauthorized→ redirect to login → infinite redirect loop.This issue did not affect Docker because Docker uses nginx for routing internally,
bypassing the Vite proxy entirely.
Fix
The proxy target is now dynamically resolved from the root .env file using the
existing
M8FLOW_BACKEND_URL_FRONTEND/M8FLOW_BACKEND_URLvariables — the samevalues already used for the backend itself.
Type
Changes
Testing
Local Dev (
npm start)http://192.168.1.77:8000(non-localhost IP)npm startfromextensions/frontend/http://localhost:8001in the browser/v1.0/permissions-check,/v1.0/status) returned200 OKwith the
Authorizationtoken correctly attached in request headersDocker (regression check)
Related Issues
Closes M8F-56