|
@@ -6,6 +6,9 @@ import { VueAxios } from './axios'
|
|
|
import { v4 as uuidv4 } from 'uuid'
|
|
import { v4 as uuidv4 } from 'uuid'
|
|
|
import { LRUCache } from 'lru-cache'
|
|
import { LRUCache } from 'lru-cache'
|
|
|
import { generateAesKey, aesEncrypt, aesDecrypt, rsaEncryptKey } from './encrypt'
|
|
import { generateAesKey, aesEncrypt, aesDecrypt, rsaEncryptKey } from './encrypt'
|
|
|
|
|
+import { isElectron } from './electron'
|
|
|
|
|
+
|
|
|
|
|
+const electron = isElectron()
|
|
|
|
|
|
|
|
const request = axios.create({
|
|
const request = axios.create({
|
|
|
baseURL: import.meta.env.VITE_APP_API_BASE_URL,
|
|
baseURL: import.meta.env.VITE_APP_API_BASE_URL,
|
|
@@ -79,6 +82,9 @@ request.interceptors.request.use(config => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (electron)
|
|
|
|
|
+ config.headers["Device-Type"] = 'RunForge Desktop Client'
|
|
|
|
|
+
|
|
|
return config
|
|
return config
|
|
|
}, errorHandler)
|
|
}, errorHandler)
|
|
|
|
|
|