8000 fix(xhr/fetch): pass `allowAbsoluteUrls` to `buildFullPath` in `xhr` … · axios/axios@ec159e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit ec159e5

Browse files
authored
fix(xhr/fetch): pass allowAbsoluteUrls to buildFullPath in xhr and fetch adapters (#6814)
1 parent a9f7689 commit ec159e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/helpers/resolveConfig.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default (config) => {
1414

1515
newConfig.headers = headers = AxiosHeaders.from(headers);
1616

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);
1818

1919
// HTTP basic authentication
2020
if (auth) {

test/specs/options.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('options', function () {
109109
instance.get('http://someotherurl.com/');
110110

111111
getAjaxRequest().then(function (request) {
112-
expect(request.url).toBe('http://someotherurl.com/');
112+
expect(request.url).toBe('http://someurl.com/http://someotherurl.com/');
113113
done();
114114
});
115115

0 commit comments

Comments
 (0)
0