Move the service
SetREDACT_QVAC_PORT when you start it:
127.0.0.1.
It can’t be reached from other machines.
For the sandboxed service, the same variable works:
Point the app at it
The browser reads the service URL fromNEXT_PUBLIC_REDACT_QVAC_URL.
Next.js inlines NEXT_PUBLIC_* variables when it compiles, so set it on the command that builds or serves the app:
npm run build, not only on npm run start.
Change the app’s port
The app port is independent of the service:http://localhost:* or http://127.0.0.1:* origin, so no service change is needed.
If you run the browser tests against another app port, set REDACT_BASE_URL, for example REDACT_BASE_URL=http://localhost:3200.