We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b8f400 commit e44403eCopy full SHA for e44403e
1 file changed
packages/console/app/src/routes/zen/util/handler.ts
@@ -170,6 +170,10 @@ export async function handler(
170
if (v === "$ip") return [[k, ip]]
171
if (v === "$workspace") return authInfo?.workspaceID ? [[k, authInfo?.workspaceID]] : []
172
if (v === "$session") return sessionId ? [[k, sessionId]] : []
173
+ if (v === "$user") {
174
+ const user = sessionId ?? authInfo?.workspaceID ?? ip
175
+ return user ? [[k, user]] : []
176
+ }
177
if (v.startsWith("$header.")) {
178
const headerValue = input.request.headers.get(v.slice(8))
179
return headerValue ? [[k, headerValue]] : []
0 commit comments