mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
fix(xhr/fetch): pass allowAbsoluteUrls to buildFullPath in xhr and fetch adapters (#6814)
This commit is contained in:
@@ -14,7 +14,7 @@ export default (config) => {
|
||||
|
||||
newConfig.headers = headers = AxiosHeaders.from(headers);
|
||||
|
||||
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
|
||||
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
|
||||
|
||||
// HTTP basic authentication
|
||||
if (auth) {
|
||||
|
||||
@@ -109,7 +109,7 @@ describe('options', function () {
|
||||
instance.get('http://someotherurl.com/');
|
||||
|
||||
getAjaxRequest().then(function (request) {
|
||||
expect(request.url).toBe('http://someotherurl.com/');
|
||||
expect(request.url).toBe('http://someurl.com/http://someotherurl.com/');
|
||||
done();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user