Skip to content

Commit 486e46d

Browse files
committed
test(plugin-auth): type the forwarding-header fixtures as header records
The declared-trust pins passed an inferred union of two object literals (each with the other key optional-undefined) where through() takes a Record of strings: TS2345 twice under tsconfig.test.json. Claude-Session: https://claude.ai/code/session_01UmqzD97e14iws6hmVhgZ5y Co-authored-by: Claude <noreply@anthropic.com>
1 parent 3761b50 commit 486e46d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/plugins/plugin-auth/src/bridge-redispatch-transport.pin.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ async function through(
287287
}
288288

289289
/** What a caller sends with no trusted proxy declared: forwarding headers naming another address. */
290-
const CLAIMED_FORWARDING = { 'x-forwarded-for': CLAIMED, 'x-real-ip': CLAIMED };
290+
const CLAIMED_FORWARDING: Record<string, string> = { 'x-forwarded-for': CLAIMED, 'x-real-ip': CLAIMED };
291291
/** What a declared trusted proxy forwards, in each of the two spellings the rule reads. */
292-
const PROXY_FORWARDING = [
292+
const PROXY_FORWARDING: Record<string, string>[] = [
293293
{ 'x-forwarded-for': `${FORWARDED_CLIENT}, ${PROXY_HOP}` },
294294
{ 'x-real-ip': FORWARDED_CLIENT },
295295
];

0 commit comments

Comments
 (0)