We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8fd015 commit 70b636aCopy full SHA for 70b636a
1 file changed
packages/console/app/src/routes/zen/util/handler.ts
@@ -90,7 +90,8 @@ export async function handler(
90
const body = await input.request.json()
91
const model = opts.parseModel(url, body)
92
const isStream = opts.parseIsStream(url, body)
93
- const ip = input.request.headers.get("x-real-ip") ?? ""
+ const rawIp = input.request.headers.get("x-real-ip") ?? ""
94
+ const ip = rawIp.includes(":") ? rawIp.split(":").slice(0, 4).join(":") : rawIp
95
const sessionId = input.request.headers.get("x-opencode-session") ?? ""
96
const requestId = input.request.headers.get("x-opencode-request") ?? ""
97
const projectId = input.request.headers.get("x-opencode-project") ?? ""
0 commit comments