Skip to content

Commit c32e1a4

Browse files
authored
ref(nextjs): Change url of parser base to make security scanners less sus (#14695)
1 parent 9e3bc93 commit c32e1a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/nextjs/src/client/routing/appRouterRoutingInstrumentation.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,8 @@ export function appRouterInstrumentNavigation(client: Client): void {
129129

130130
function transactionNameifyRouterArgument(target: string): string {
131131
try {
132-
return new URL(target, 'http://some-random-base.com/').pathname;
132+
// We provide an arbitrary base because we only care about the pathname and it makes URL parsing more resilient.
133+
return new URL(target, 'http://example.com/').pathname;
133134
} catch {
134135
return '/';
135136
}

0 commit comments

Comments
 (0)