Skip to content

Commit 4bb635a

Browse files
committed
fix authority url
1 parent 290a72e commit 4bb635a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/sveltekit/src/client/load.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ function instrumentSvelteKitFetch(originalFetch: SvelteKitFetch): SvelteKitFetch
182182
const patchedFetchArgs = [input, patchedInit];
183183

184184
if (createSpan) {
185+
U;
185186
fetchPromise = trace(
186187
{
187188
name: `${requestData.method} ${requestData.url}`, // this will become the description of the span

packages/utils/src/url.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export function getSanitizedUrlString(url: PartialURL): string {
6868
(host &&
6969
host
7070
// Always filter out authority
71-
.replace(/^.*:.*@/, '[filtered]:[filtered]@')
71+
// Regex partially taken from: https://stackoverflow.com/a/6165138
72+
.replace(/(?:([^@]*)@)/, '[filtered]:[filtered]@')
7273
// Don't show standard :80 (http) and :443 (https) ports to reduce the noise
7374
.replace(':80', '')
7475
.replace(':443', '')) ||

0 commit comments

Comments
 (0)