mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 21:02:21 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user