Skip to content

Commit

Permalink
ref(nextjs): Change url of parser base to make security scanners less…
Browse files Browse the repository at this point in the history
… sus (#14695)
  • Loading branch information
lforst authored Dec 13, 2024
1 parent 9e3bc93 commit c32e1a4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export function appRouterInstrumentNavigation(client: Client): void {

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

0 comments on commit c32e1a4

Please sign in to comment.