Auto-set VITE_API_URL for React/Vite apps deployed to proxied container address #27
Labels
No labels
blocked:gate-plan
blocked:needs-decision
blocked:needs-human
blocked:no-changes
bug
feature-request
in-progress
ops-retry
ops-task
quickfix
security/high
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/node_hub#27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
When deploying React/Vite full-stack apps to NodeHub, the frontend makes API calls to
/api/*which gets proxied to the wrong destination. The app needs to call the full proxied URL (e.g.,/proxy/app-xxx/api/*) instead of relative/api/*.Current Workaround
Users must manually set
VITE_API_URLenvironment variable to the full proxy path before deployment.Expected Behavior
NodeHub should automatically detect Vite/React apps and set
VITE_API_URLto the correct proxied container address (e.g.,/proxy/{instanceId}/) so API calls work without manual configuration.Example
For an app deployed at
https://nodehub.example.com/proxy/app-123/, NodeHub should automatically set:This way, frontend API calls like
fetch("/api/users")becomefetch("/proxy/app-123/api/users")which correctly routes to the backend.Priority
High - blocks full-stack React app deployments
GSD RESEARCH phase failed: LLM provider timeout or error.
Retry on next pipeline tick.
Fixed in commit. Closing.