We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 346fd1c commit f467cb3Copy full SHA for f467cb3
1 file changed
frontend/src/utils/request.ts
@@ -75,7 +75,7 @@ class HttpService {
75
private setupInterceptors() {
76
// Request interceptor
77
this.instance.interceptors.request.use(
78
- (config: InternalAxiosRequestConfig) => {
+ async (config: InternalAxiosRequestConfig) => {
79
// Add auth token
80
const token = wsCache.get('user.token')
81
if (token && config.headers) {
@@ -90,6 +90,9 @@ class HttpService {
90
!!(assistantStore.getType % 2) &&
91
assistantStore.getCertificate
92
) {
93
+ if (config.method?.toLowerCase() === 'get' && /\/chat\/\d+$/.test(config.url || '')) {
94
+ await assistantStore.refreshCertificate()
95
+ }
96
config.headers['X-SQLBOT-ASSISTANT-CERTIFICATE'] = btoa(
97
encodeURIComponent(assistantStore.getCertificate)
98
)
0 commit comments