Running it
cd project && docker compose up -d postgres
psql "$DATABASE_URL" -f project/pg-init-scripts/gateway.sql
docker compose up -d --build # postgres + gateway-go (8080) + frontend (3000)
cd gateway-go && go build ./... && go vet ./... && go test ./...
cd frontend && npm run lint && npm run typecheck && npm test && npm run build
What I observed
After login, from inside the page:
document.cookie => ""
session cookie => gw_session httpOnly=true sameSite=Lax
BFF 200 /gw/auth/login
BFF 200 /gw/apis
The cookie exists and every backend call went through the BFF, yet document.cookie is empty: the token is unreadable.
The Try-it console also surfaced an environment fact: a public upstream failed with x509: certificate signed by unknown authority because the container lacked this network's intercepting CA. The gateway returned the real error instead of a generic 500; an internal endpoint completed the round trip.