Skip to content

Commit 9336511

Browse files
committed
fix: improve regular expression for redactions
1 parent 548e84c commit 9336511

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export const getProxyUrl = (): string | undefined => {
157157
* Never log a raw proxy URL — always pass it through this helper first.
158158
*/
159159
export const redactProxyUrl = (url: string): string => {
160-
return url.replace(/(https?:\/\/)[^@]+@/, '$1<redacted>@');
160+
return url.replace(/^(https?:\/\/)[^@]+@/, '$1<redacted>@');
161161
};
162162

163163
// Get upstream proxy configuration

0 commit comments

Comments
 (0)