diff --git a/index.d.ts b/index.d.ts index 0dd9203..42948b7 100644 --- a/index.d.ts +++ b/index.d.ts @@ -285,6 +285,8 @@ export type Options = { URLs with custom protocols are not normalized and just passed through by default. Supported protocols are: `https`, `http`, `file`, and `data`. +Human-friendly URLs with basic auth (for example, `user:password@sindresorhus.com`) are not handled because basic auth conflicts with custom protocols. [Basic auth URLs are also deprecated.](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#access_using_credentials_in_the_url) + @param url - URL to normalize, including [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs). @example diff --git a/readme.md b/readme.md index 02ae2ba..45cf82c 100644 --- a/readme.md +++ b/readme.md @@ -32,6 +32,8 @@ normalizeUrl('//www.sindresorhus.com:80/../baz?b=bar&a=foo'); URLs with custom protocols are not normalized and just passed through by default. Supported protocols are: `https`, `http`, `file`, and `data`. +Human-friendly URLs with basic auth (for example, `user:password@sindresorhus.com`) are not handled because basic auth conflicts with custom protocols. [Basic auth URLs are also deprecated.](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#access_using_credentials_in_the_url) + #### url Type: `string`