fix(dev): verify remote proxy TLS and document the OIDC limit (address Greptile review)

Remote DEV_PROXY_TARGET upstreams now keep certificate verification on,
since authenticated /api traffic flows through them. Loopback targets keep
secure: false as before. DEVELOPER_SETUP.md notes that OIDC sign-in cannot
complete through the proxy.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Georges-Antoine Assi
2026-09-24 20:53:20 -04:00
parent d0cc8a4be5
commit d5b4019d96
2 changed files with 6 additions and 2 deletions

View File

@@ -185,7 +185,7 @@ For responsive layouts, use the viewport toolbar presets from `.storybook/rommVi
#### - Optional: local frontend against a remote RomM
To run `npm run dev` or `npm run preview` against another RomM instance (for example a home server with a full library), set `DEV_PROXY_TARGET` in the repo-root `.env` to its origin, such as `https://romm.example.com`. Vite then proxies `/api`, `/ws` and `/assets/romm` there instead of the local backend. Leave it empty to keep the default `http://127.0.0.1:${DEV_PORT}`.
To run `npm run dev` or `npm run preview` against another RomM instance (for example a home server with a full library), set `DEV_PROXY_TARGET` in the repo-root `.env` to its origin, such as `https://romm.example.com`. Vite then proxies `/api`, `/ws` and `/assets/romm` there instead of the local backend. Leave it empty to keep the default `http://127.0.0.1:${DEV_PORT}`. The remote's TLS certificate must be valid. Sign in with a username and password: OIDC login does not work through the proxy, because the identity provider redirects to the remote's `OIDC_REDIRECT_URI`, so the session never reaches localhost.
## Setting up the linter

View File

@@ -72,7 +72,11 @@ export default defineConfig(({ mode }) => {
const proxyTarget = env.DEV_PROXY_TARGET || `http://127.0.0.1:${backendPort}`;
const remote = Boolean(env.DEV_PROXY_TARGET);
const upstream = { target: proxyTarget, changeOrigin: remote, secure: false };
const upstream = {
target: proxyTarget,
changeOrigin: remote,
secure: remote,
};
const proxy = {
"/api": upstream,
"^/(?:ws|netplay)": { ...upstream, ws: true },