违规记录
This commit is contained in:
@ -25,7 +25,7 @@ export const globalHeaders = () => {
|
||||
|
||||
axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
|
||||
axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
|
||||
// axios.defaults.headers['projectId'] = cache.local.getJSON('selectedProject')?.id || '';
|
||||
axios.defaults.headers['isEncrypt'] = true;
|
||||
|
||||
// 创建 axios 实例
|
||||
const service = axios.create({
|
||||
@ -85,6 +85,8 @@ service.interceptors.request.use(
|
||||
// 生成一个 AES 密钥
|
||||
const aesKey = generateAesKey();
|
||||
config.headers[encryptHeader] = encrypt(encryptBase64(aesKey));
|
||||
console.log(encrypt(encryptBase64(aesKey)));
|
||||
|
||||
config.data = typeof config.data === 'object' ? encryptWithAes(JSON.stringify(config.data), aesKey) : encryptWithAes(config.data, aesKey);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user