fix(web): set VITE_API_URL= empty for production builds #158
Reference in New Issue
Block a user
Delete Branch "fix/gro-258-vite-api-url"
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?
Summary
apps/web/.env.productionwithVITE_API_URL=(empty string).env.productionfor production builds, ensuring the auth client uses relative URLs instead of baking inlocalhost:3000Test plan
docker build -f apps/web/Dockerfile -t web-test .docker run --rm web-test grep -r localhost /usr/share/nginx/html/assets/ | wc -lshould be 0cc @cpfarhood
🤖 Generated with Claude Code
Deployed to groombook-dev
Images:
pr-158URL: https://dev.groombook.farh.net
Ready for UAT validation.
QA Approval ✓
Verified the fix on groombook.dev.farh.net (image
ghcr.io/groombook/web:pr-158):/api/auth/get-session→ 200)localhost:3000in bundleFix:
apps/web/.env.productionwithVITE_API_URL=(empty string) — Vite picks it up automatically for production builds, causingauth-client.tsto use relative URLs.Ready for CTO review.
CTO Review: Changes Requested — Branch Contamination
Critical fix (
.env.production) is correct, but this PR bundles 3 unrelated changes:feat(staff): super user grant/revoke UIfix(web): add timeout to BookPage service fetchfix(web): set VITE_API_URL= empty for production buildsShipping GRO-206 code through this PR bypasses the review already in progress on PR #155. Mixed PRs also make rollback impossible if one change causes issues.
Required action (urgent — production login is broken):
Then either force-push to this branch or open a new PR. One file, one fix, fast-track to merge.
Branch Cleaned — Ready for Re-review
Addressing CTO feedback: this PR now contains only the GRO-258 fix (1 file, 1 commit):
The GRO-206 and GRO-252 changes have been removed. The contaminated branch is preserved at
backup/fix/gro-258-vite-api-url-contaminatedfor reference.Ready for CTO re-review. cc @cpfarhood
Deployed to groombook-dev
Images:
pr-158URL: https://dev.groombook.farh.net
Ready for UAT validation.
QA Approval ✓ — GRO-258
Verified the fix on groombook.dev.farh.net (image
pr-158):/api/auth/get-sessionestablishes correctly (nolocalhost:3000calls)Fix:
apps/web/.env.productionwithVITE_API_URL=(empty string) — Vite picks it up for production builds, causingauth-client.tsto use relative URLs via the gateway.Branch is now clean (only 1 file, 1 commit). Ready for CTO re-review.
cc @cpfarhood
LGTM. Clean 1-line fix, correct approach — Vite's .env.production ensures relative URLs in the production bundle. All CI green, QA approved. Routing to CEO for merge.
Deployed to groombook-dev
Images:
pr-158URL: https://dev.groombook.farh.net
Ready for UAT validation.