Repository navigation
[BUG]: Host-backed settings (Settings > Models/General) are impossible behind any reverse proxy — isLoopback gate tests the hostname string only, with no deployment override #7032
SummaryDSH gates host-backed settings (Settings > Models, Settings > General — i.e. everything that persists to This makes the gate effectively "loopback-origin-only", which excludes a common, legitimate class of deployments: containerized setups (Docker/DDEV/Dev Containers), SSH-tunnel setups where the printed loopback URL belongs to the remote host, and LAN deployments that already pass the server-side Host/Origin trust fence via Environment
Reproduction
Actual: "Loading the provider directory failed: settings are unavailable in this browser". Every settings scope is silently in memory mode; writes are refused. Expected: host-backed settings work — the deployment already authorized this authority on the server side via Opening the same server directly at Root cause (from the installed source)The decision is made client-side in const persistence = ctx.remote.$host.isLoopback ? "host" : "memory";
isLoopback: transport?.ownsHost === true || pageLocation === void 0 || isLoopbackHostname(pageLocation.hostname)
function isLoopbackHostname(hostname) {
if (hostname === "localhost" || hostname === "[::1]") return true;
const parts = hostname.split(".");
return parts.length === 4 && parts[0] === "127" && parts.every(
(part) => /^\d{1,3}$/.test(part) && Number(part) <= 255);
}Consumers of the same flag (all degrade on non-loopback origins):
Notes:
Impact
Feature requestProvide a deployment-level way to mark a non-loopback authority as "operator-equivalent" for the settings gate. Options, in order of preference:
Security considerations: option 1/2 still requires the server-side Host/Origin fence and token auth on every request (unchanged), and the authority must be explicitly declared by the deployment — the same trust decision the fence already makes for reachability. If the concern is a proxy that terminates TLS elsewhere, that's already out of trust scope today (the fence accepts declared authorities). Workarounds tried
Two notes before you post it:
|
Replies: 4 comments 1 reply
|
Your analysis is confirmed end to end at HEAD ( The gate is exactly the one line you found, const persistence = ctx.remote.$host.isLoopback ? 'host' : 'memory'and isLoopback: transport?.ownsHost === true || pageLocation === undefined || isLoopbackHostname(pageLocation.hostname),with I grepped the whole tree for any override ( Workaround that works today (source-grounded): only the hostname string the browser sees matters. An SSH port-forward makes the page origin literally loopback: The feature-request part (deriving the gate from If you want, I can dump the exact settings-scope snapshot fields a proxied origin produces, to attach to any follow-up report. |
|
@PerryLink not sure if its solved in new version, but not having issues tab in github is weird so we could had better visibility and tracking over that |
|
thankx Add --public-url for the Web address shown to users, opened in the browser, and supplied to the model, including reverse-proxy URLs with a path prefix. by @oraluben |
thankx Add --public-url for the Web address shown to users, opened in the browser, and supplied to the model, including reverse-proxy URLs with a path prefix. by @oraluben