axios 1.8.1 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.cts CHANGED
@@ -376,6 +376,7 @@ declare namespace axios {
376
376
  url?: string;
377
377
  method?: Method | string;
378
378
  baseURL?: string;
379
+ allowAbsoluteUrls?: boolean;
379
380
  transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
380
381
  transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
381
382
  headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
package/index.d.ts CHANGED
@@ -317,6 +317,7 @@ export interface AxiosRequestConfig<D = any> {
317
317
  url?: string;
318
318
  method?: Method | string;
319
319
  baseURL?: string;
320
+ allowAbsoluteUrls?: boolean;
320
321
  transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
321
322
  transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
322
323
  headers?: (RawAxiosRequestHeaders & MethodsHeaders) | AxiosHeaders;
@@ -228,7 +228,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
228
228
  }
229
229
 
230
230
  // Parse url
231
- const fullPath = buildFullPath(config.baseURL, config.url);
231
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
232
232
  const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
233
233
  const protocol = parsed.protocol || supportedProtocols[0];
234
234
 
package/lib/env/data.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.8.1";
1
+ export const VERSION = "1.8.3";
@@ -14,7 +14,7 @@ export default (config) => {
14
14
 
15
15
  newConfig.headers = headers = AxiosHeaders.from(headers);
16
16
 
17
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
17
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
18
18
 
19
19
  // HTTP basic authentication
20
20
  if (auth) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.8.1",
3
+ "version": "1.8.3",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "index.js",
6
6
  "exports": {