sync
This commit is contained in:
parent
a99337fbe1
commit
64d67f2134
1 changed files with 4 additions and 0 deletions
|
|
@ -170,6 +170,10 @@ export async function handler(
|
||||||
if (v === "$ip") return [[k, ip]]
|
if (v === "$ip") return [[k, ip]]
|
||||||
if (v === "$workspace") return authInfo?.workspaceID ? [[k, authInfo?.workspaceID]] : []
|
if (v === "$workspace") return authInfo?.workspaceID ? [[k, authInfo?.workspaceID]] : []
|
||||||
if (v === "$session") return sessionId ? [[k, sessionId]] : []
|
if (v === "$session") return sessionId ? [[k, sessionId]] : []
|
||||||
|
if (v === "$user") {
|
||||||
|
const user = sessionId ?? authInfo?.workspaceID ?? ip
|
||||||
|
return user ? [[k, user]] : []
|
||||||
|
}
|
||||||
if (v.startsWith("$header.")) {
|
if (v.startsWith("$header.")) {
|
||||||
const headerValue = input.request.headers.get(v.slice(8))
|
const headerValue = input.request.headers.get(v.slice(8))
|
||||||
return headerValue ? [[k, headerValue]] : []
|
return headerValue ? [[k, headerValue]] : []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue