2021-06-24 23:42:28 +00:00
|
|
|
import { base_host, base_url } from './config.js';
|
|
|
|
|
|
|
|
const htmlRequestHeader = {
|
|
|
|
accept:
|
|
|
|
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
|
|
|
|
};
|
|
|
|
|
|
|
|
const jsonRequestHeader = {
|
|
|
|
accept: 'application/json, text/javascript, */*; q=0.01'
|
|
|
|
};
|
|
|
|
|
2021-07-09 11:27:00 +00:00
|
|
|
const jsonAPIRequestHeader = {
|
|
|
|
accept: 'application/json, */*;q=0.1'
|
|
|
|
};
|
|
|
|
|
2021-06-24 23:42:28 +00:00
|
|
|
const allRequestHeader = {
|
|
|
|
accept: '*//*'
|
|
|
|
};
|
|
|
|
|
|
|
|
const commonRequestHeaders = {
|
|
|
|
//'accept-encoding': 'gzip, deflate, br',
|
|
|
|
'accept-language': 'en-US,en;q=0.9'
|
|
|
|
};
|
|
|
|
|
|
|
|
const commonGetRequestHeaders = {
|
|
|
|
connection: 'keep-alive',
|
|
|
|
host: `${base_host}`,
|
|
|
|
'sec-fetch-dest': 'document',
|
|
|
|
'sec-fetch-mode': 'navigate',
|
|
|
|
'sec-fetch-site': 'same-origin',
|
|
|
|
'sec-fetch-user': '?1',
|
|
|
|
'upgrade-insecure-requests': '1'
|
|
|
|
};
|
2021-07-09 11:27:00 +00:00
|
|
|
|
|
|
|
const commonAPIGetRequestHeaders = {
|
|
|
|
connection: 'keep-alive',
|
|
|
|
host: `${base_host}`,
|
|
|
|
'sec-fetch-dest': 'empty',
|
|
|
|
'sec-fetch-mode': 'cors',
|
|
|
|
'sec-fetch-site': 'same-origin',
|
|
|
|
};
|
2021-06-24 23:42:28 +00:00
|
|
|
|
|
|
|
const commonPostRequestHeaders = {
|
|
|
|
//'content-type':
|
|
|
|
// 'application/x-www-form-urlencoded;type=content-type;mimeType=application/x-www-form-urlencoded',
|
|
|
|
origin: `${base_url}`,
|
|
|
|
'sec-fetch-dest': 'empty',
|
|
|
|
'sec-fetch-mode': 'cors',
|
|
|
|
'sec-fetch-site': 'same-origin',
|
|
|
|
'x-requested-with': 'XMLHttpRequest'
|
|
|
|
};
|
|
|
|
|
|
|
|
const commonNonStandardHeaders = {
|
|
|
|
'sec-ch-ua':
|
|
|
|
'" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
|
|
|
|
'sec-ch-ua-mobile': '?0'
|
|
|
|
};
|
|
|
|
|
|
|
|
export {
|
|
|
|
htmlRequestHeader,
|
|
|
|
jsonRequestHeader,
|
2021-07-09 11:27:00 +00:00
|
|
|
jsonAPIRequestHeader,
|
2021-06-24 23:42:28 +00:00
|
|
|
allRequestHeader,
|
|
|
|
commonRequestHeaders,
|
|
|
|
commonGetRequestHeaders,
|
2021-07-09 11:27:00 +00:00
|
|
|
commonAPIGetRequestHeaders,
|
2021-06-24 23:42:28 +00:00
|
|
|
commonPostRequestHeaders,
|
|
|
|
commonNonStandardHeaders,
|
|
|
|
};
|