修改登录判断问题
This commit is contained in:
2
.output/server/node_modules/axios/lib/adapters/http.js
generated
vendored
2
.output/server/node_modules/axios/lib/adapters/http.js
generated
vendored
@@ -228,7 +228,7 @@ export default isHttpAdapterSupported && function httpAdapter(config) {
|
||||
}
|
||||
|
||||
// Parse url
|
||||
const fullPath = buildFullPath(config.baseURL, config.url);
|
||||
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
||||
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
|
||||
const protocol = parsed.protocol || supportedProtocols[0];
|
||||
|
||||
|
||||
11
.output/server/node_modules/axios/lib/core/Axios.js
generated
vendored
11
.output/server/node_modules/axios/lib/core/Axios.js
generated
vendored
@@ -97,6 +97,15 @@ class Axios {
|
||||
}
|
||||
}
|
||||
|
||||
// Set config.allowAbsoluteUrls
|
||||
if (config.allowAbsoluteUrls !== undefined) {
|
||||
// do nothing
|
||||
} else if (this.defaults.allowAbsoluteUrls !== undefined) {
|
||||
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
|
||||
} else {
|
||||
config.allowAbsoluteUrls = true;
|
||||
}
|
||||
|
||||
validator.assertOptions(config, {
|
||||
baseUrl: validators.spelling('baseURL'),
|
||||
withXsrfToken: validators.spelling('withXSRFToken')
|
||||
@@ -192,7 +201,7 @@ class Axios {
|
||||
|
||||
getUri(config) {
|
||||
config = mergeConfig(this.defaults, config);
|
||||
const fullPath = buildFullPath(config.baseURL, config.url);
|
||||
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
||||
return buildURL(fullPath, config.params, config.paramsSerializer);
|
||||
}
|
||||
}
|
||||
|
||||
5
.output/server/node_modules/axios/lib/core/buildFullPath.js
generated
vendored
5
.output/server/node_modules/axios/lib/core/buildFullPath.js
generated
vendored
@@ -13,8 +13,9 @@ import combineURLs from '../helpers/combineURLs.js';
|
||||
*
|
||||
* @returns {string} The combined full path
|
||||
*/
|
||||
export default function buildFullPath(baseURL, requestedURL) {
|
||||
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
||||
export default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
||||
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
||||
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
||||
return combineURLs(baseURL, requestedURL);
|
||||
}
|
||||
return requestedURL;
|
||||
|
||||
2
.output/server/node_modules/axios/lib/env/data.js
generated
vendored
2
.output/server/node_modules/axios/lib/env/data.js
generated
vendored
@@ -1 +1 @@
|
||||
export const VERSION = "1.7.9";
|
||||
export const VERSION = "1.8.2";
|
||||
5
.output/server/node_modules/axios/lib/helpers/formDataToStream.js
generated
vendored
5
.output/server/node_modules/axios/lib/helpers/formDataToStream.js
generated
vendored
@@ -2,8 +2,9 @@ import util from 'util';
|
||||
import {Readable} from 'stream';
|
||||
import utils from "../utils.js";
|
||||
import readBlob from "./readBlob.js";
|
||||
import platform from "../platform/index.js";
|
||||
|
||||
const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
|
||||
const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';
|
||||
|
||||
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util.TextEncoder();
|
||||
|
||||
@@ -63,7 +64,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
||||
const {
|
||||
tag = 'form-data-boundary',
|
||||
size = 25,
|
||||
boundary = tag + '-' + utils.generateString(size, BOUNDARY_ALPHABET)
|
||||
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
|
||||
} = options || {};
|
||||
|
||||
if(!utils.isFormData(form)) {
|
||||
|
||||
26
.output/server/node_modules/axios/lib/platform/node/index.js
generated
vendored
26
.output/server/node_modules/axios/lib/platform/node/index.js
generated
vendored
@@ -1,6 +1,30 @@
|
||||
import crypto from 'crypto';
|
||||
import URLSearchParams from './classes/URLSearchParams.js'
|
||||
import FormData from './classes/FormData.js'
|
||||
|
||||
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
|
||||
|
||||
const DIGIT = '0123456789';
|
||||
|
||||
const ALPHABET = {
|
||||
DIGIT,
|
||||
ALPHA,
|
||||
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
||||
}
|
||||
|
||||
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
||||
let str = '';
|
||||
const {length} = alphabet;
|
||||
const randomValues = new Uint32Array(size);
|
||||
crypto.randomFillSync(randomValues);
|
||||
for (let i = 0; i < size; i++) {
|
||||
str += alphabet[randomValues[i] % length];
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
isNode: true,
|
||||
classes: {
|
||||
@@ -8,5 +32,7 @@ export default {
|
||||
FormData,
|
||||
Blob: typeof Blob !== 'undefined' && Blob || null
|
||||
},
|
||||
ALPHABET,
|
||||
generateString,
|
||||
protocols: [ 'http', 'https', 'file', 'data' ]
|
||||
};
|
||||
|
||||
22
.output/server/node_modules/axios/lib/utils.js
generated
vendored
22
.output/server/node_modules/axios/lib/utils.js
generated
vendored
@@ -602,26 +602,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
||||
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
||||
}
|
||||
|
||||
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
|
||||
|
||||
const DIGIT = '0123456789';
|
||||
|
||||
const ALPHABET = {
|
||||
DIGIT,
|
||||
ALPHA,
|
||||
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
||||
}
|
||||
|
||||
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
||||
let str = '';
|
||||
const {length} = alphabet;
|
||||
while (size--) {
|
||||
str += alphabet[Math.random() * length|0]
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
* If the thing is a FormData object, return true, otherwise return false.
|
||||
*
|
||||
@@ -749,8 +729,6 @@ export default {
|
||||
findKey,
|
||||
global: _global,
|
||||
isContextDefined,
|
||||
ALPHABET,
|
||||
generateString,
|
||||
isSpecCompliantForm,
|
||||
toJSONObject,
|
||||
isAsyncFn,
|
||||
|
||||
Reference in New Issue
Block a user