File tree Expand file tree Collapse file tree
packages/console/app/src/routes/zen/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,11 +158,13 @@ export async function handler(
158158 Object . entries ( obj ) . flatMap ( ( [ k , v ] ) => {
159159 if ( Array . isArray ( v ) ) return [ [ k , v ] ]
160160 if ( typeof v === "object" ) return [ [ k , replacer ( v ) ] ]
161- if ( v === "$ip" ) return [ [ k , ip ] ]
162- if ( v === "$workspace" ) return authInfo ?. workspaceID ? [ [ k , authInfo ?. workspaceID ] ] : [ ]
163- if ( v . startsWith ( "$header." ) ) {
164- const headerValue = input . request . headers . get ( v . slice ( 8 ) )
165- return headerValue ? [ [ k , headerValue ] ] : [ ]
161+ if ( typeof v === "string" ) {
162+ if ( v === "$ip" ) return [ [ k , ip ] ]
163+ if ( v === "$workspace" ) return authInfo ?. workspaceID ? [ [ k , authInfo ?. workspaceID ] ] : [ ]
164+ if ( v . startsWith ( "$header." ) ) {
165+ const headerValue = input . request . headers . get ( v . slice ( 8 ) )
166+ return headerValue ? [ [ k , headerValue ] ] : [ ]
167+ }
166168 }
167169 return [ [ k , v ] ]
168170 } ) ,
You can’t perform that action at this time.
0 commit comments