mirror of
https://github.com/tenrok/axios.git
synced 2026-06-08 17:22:34 +03:00
import isURLSameOrigin at top
This commit is contained in:
+1
-2
@@ -42,7 +42,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
// Create the request
|
||||
var request = new adapter('Microsoft.XMLHTTP');
|
||||
request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
|
||||
|
||||
console.log(request);
|
||||
// Set the request timeout in MS
|
||||
request.timeout = config.timeout;
|
||||
|
||||
@@ -78,7 +78,6 @@ module.exports = function xhrAdapter(resolve, reject, config) {
|
||||
// Specifically not if we're in a web worker, or react-native.
|
||||
if (utils.isStandardBrowserEnv()) {
|
||||
var cookies = require('./../helpers/cookies');
|
||||
var isURLSameOrigin = require('./../helpers/isURLSameOrigin');
|
||||
|
||||
// Add xsrf header
|
||||
var xsrfValue = isURLSameOrigin(config.url) ?
|
||||
|
||||
Reference in New Issue
Block a user