Use internal backend URL for frontend server runtime
This commit is contained in:
@ -136,6 +136,7 @@ Nilai yang wajib dipakai untuk domain ini:
|
||||
NODE_ENV=production
|
||||
FRONTEND_ORIGIN=https://portal.bizone.id
|
||||
PUBLIC_API_URL=https://portal.bizone.id
|
||||
INTERNAL_API_URL=http://127.0.0.1:3001/api
|
||||
NEXT_PUBLIC_API_URL=https://portal.bizone.id/api
|
||||
PORT=3001
|
||||
WEBHOOK_ALLOW_UNSIGNED=false
|
||||
@ -344,3 +345,10 @@ NEXT_PUBLIC_API_URL=https://portal.bizone.id/backend-api
|
||||
|
||||
Ini penting agar frontend server-side berbicara ke backend asli, sementara browser tetap bisa memakai route handler Next.js di `/api/*`.
|
||||
|
||||
Tambahkan juga:
|
||||
|
||||
```dotenv
|
||||
INTERNAL_API_URL=http://127.0.0.1:3001/api
|
||||
```
|
||||
|
||||
`INTERNAL_API_URL` dipakai oleh server-side frontend, middleware, dan server actions untuk langsung memanggil backend internal tanpa lewat reverse proxy publik.
|
||||
|
||||
Reference in New Issue
Block a user