Skip to content

Commit

Permalink
fix(http): treat http://localhost as base URL for relative paths to a…
Browse files Browse the repository at this point in the history
…void `ERR_INVALID_URL` error; (#5528)
  • Loading branch information
DigitalBrainJS committed Feb 3, 2023
1 parent 54d3fac commit 128d56f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/adapters/http.js
Expand Up @@ -183,7 +183,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {

// Parse url
const fullPath = buildFullPath(config.baseURL, config.url);
const parsed = new URL(fullPath);
const parsed = new URL(fullPath, 'http://localhost');
const protocol = parsed.protocol || supportedProtocols[0];

if (protocol === 'data:') {
Expand Down

0 comments on commit 128d56f

Please sign in to comment.