perf: Disable the sqlbot-license-key verification mechanism

This commit is contained in:
fit2cloud-chenyw
2025-08-29 11:26:30 +08:00
parent 8747fb7c95
commit 7c848452d4
+10 -9
View File
@@ -11,8 +11,8 @@ import axios, {
import { useCache } from '@/utils/useCache'
import { getLocale } from './utils'
import { useAssistantStore } from '@/stores/assistant'
import { i18n } from '@/i18n'
const t = i18n.global.t
// import { i18n } from '@/i18n'
// const t = i18n.global.t
const assistantStore = useAssistantStore()
const { wsCache } = useCache()
// Response data structure
@@ -65,10 +65,10 @@ class HttpService {
this.setupInterceptors()
}
private cancelCurrentRequest(message: string) {
/* private cancelCurrentRequest(message: string) {
this.cancelTokenSource.cancel(message)
this.cancelTokenSource = axios.CancelToken.source()
}
} */
private setupInterceptors() {
// Request interceptor
@@ -112,7 +112,7 @@ class HttpService {
return config
}
try {
/* try {
const request_key = LicenseGenerator.generate()
config.headers['X-SQLBOT-KEY'] = request_key
} catch (e: any) {
@@ -120,7 +120,7 @@ class HttpService {
this.cancelCurrentRequest('license-key error detected')
showLicenseKeyError()
}
}
} */
// Request logging
// console.log(`[Request] ${config.method?.toUpperCase()} ${config.url}`)
@@ -293,7 +293,7 @@ class HttpService {
}
}
try {
/* try {
const request_key = LicenseGenerator.generate()
heads['X-SQLBOT-KEY'] = request_key
} catch (e: any) {
@@ -301,7 +301,7 @@ class HttpService {
controller?.abort('license-key error detected')
showLicenseKeyError()
}
}
} */
const real_url = import.meta.env.VITE_API_BASE_URL
return fetch(real_url + url, {
@@ -422,7 +422,7 @@ class HttpService {
export const request = new HttpService({
baseURL: import.meta.env.VITE_API_BASE_URL,
})
/*
const showLicenseKeyError = (msg?: string) => {
ElMessageBox.confirm(t('license.error_tips'), {
confirmButtonType: 'primary',
@@ -438,3 +438,4 @@ const showLicenseKeyError = (msg?: string) => {
},
})
}
*/