9router/src
Nguyen Thanh Dat 92259214db fix(security): require proof that x-9r-real-ip came from the socket (GHSA-pjm4-8fpg-f9p6)
x-9r-real-ip and the Host fallback were trusted from client-controlled
headers whenever custom-server.js was not in the request path (npm run
start, start:bun), letting a remote caller pose as local to skip API key
auth and reach LOCAL_ONLY_PATHS (/api/mcp/*, /api/tunnel/enable,
/api/auth/reset-password).

custom-server.js now generates a per-process secret at boot and stamps it
as x-9r-peer-token on every request it sanitizes. hasTrustedPeerHeaders()
(src/lib/auth/trustedPeer.js) gates trust in x-9r-real-ip on that secret;
otherwise the guard falls back to Host only in development, and fails
closed in production. Same gate on loginLimiter.getClientIp() so a spoofed
header cannot rotate the login lockout bucket.

Also: fix isLoopbackHostname for IPv6 (::1, ::ffff:127.0.0.1) which the
old split(":")[0] reduced to empty string; route npm run start /
start:bun through custom-server.js (postbuild copies it into
.next/standalone, build-cli.js fails without it) so documented deployments
keep passwordless local access.
2026-08-14 16:33:58 +07:00
..
app feat(auth): add native SAML 2.0 SSO integration 2026-08-13 17:56:34 +07:00
i18n feat(i18n): add Khmer language support 2026-07-19 16:30:37 +07:00
lib fix(security): require proof that x-9r-real-ip came from the socket (GHSA-pjm4-8fpg-f9p6) 2026-08-14 16:33:58 +07:00
mitm feat(antigravity): add Gemini 3.7 Flash models (#3286, #3281) 2026-08-14 16:27:10 +07:00
models feat: add OpenCode Go provider and support for custom models 2026-04-22 14:16:21 +07:00
shared feat(antigravity): add Gemini 3.7 Flash models (#3286, #3281) 2026-08-14 16:27:10 +07:00
sse fix(providers): remove Qwen provider support 2026-08-05 16:17:26 +07:00
store feat(db): migrate from lowdb to SQLite with repos pattern 2026-05-09 17:48:20 +07:00
dashboardGuard.js fix(security): require proof that x-9r-real-ip came from the socket (GHSA-pjm4-8fpg-f9p6) 2026-08-14 16:33:58 +07:00
instrumentation.js fix(console-log): initialize capture at server boot + prevent SSE proxy buffering 2026-07-23 16:06:21 +07:00
proxy.js fix: use export default in proxy.js for Next.js 16 middleware detection 2026-06-13 09:57:20 +07:00