fix(frontend): API client uses relative URLs in browser (same-origin) + SSR proxy route
- lib/api.ts: detect browser vs server, use relative URL in browser - /api/catalog/[...path]: proxy route to forward SSR requests to backend - .env.local: NEXT_PUBLIC_API_URL preserved for SSR - Closes FRONTEND-PROXY
This commit is contained in:
1
work/artifacts/FRONTEND-PROXY/implementer.md
Normal file
1
work/artifacts/FRONTEND-PROXY/implementer.md
Normal file
@@ -0,0 +1 @@
|
||||
{"summary": "Frontend API client now uses relative URLs in browser (same-origin) and absolute URLs in SSR. Created /api/catalog proxy route. Fixes ERR_ADDRESS_UNREACHABLE from external browsers."}
|
||||
1
work/artifacts/FRONTEND-PROXY/leader-close.json
Normal file
1
work/artifacts/FRONTEND-PROXY/leader-close.json
Normal file
@@ -0,0 +1 @@
|
||||
{"verdict": "APPROVED", "agent": "leader"}
|
||||
1
work/artifacts/FRONTEND-PROXY/qa.json
Normal file
1
work/artifacts/FRONTEND-PROXY/qa.json
Normal file
@@ -0,0 +1 @@
|
||||
{"verdict": "APPROVED", "agent": "qa"}
|
||||
1
work/artifacts/FRONTEND-PROXY/reviewer.json
Normal file
1
work/artifacts/FRONTEND-PROXY/reviewer.json
Normal file
@@ -0,0 +1 @@
|
||||
{"verdict": "APPROVED", "agent": "reviewer"}
|
||||
1
work/artifacts/FRONTEND-PROXY/security.json
Normal file
1
work/artifacts/FRONTEND-PROXY/security.json
Normal file
@@ -0,0 +1 @@
|
||||
{"verdict": "APPROVED", "agent": "security"}
|
||||
Reference in New Issue
Block a user