feat: Token middleware

This commit is contained in:
fit2cloud-chenyw
2025-04-28 15:00:37 +08:00
parent 6dd8631d4d
commit b009779c0e
6 changed files with 86 additions and 4 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ class HttpService {
// Add auth token
const token = wsCache.get('user.token')
if (token && config.headers) {
config.headers['X-SQLBOT_TOKEN'] = `Bearer ${token}`
config.headers['X-SQLBOT-TOKEN'] = `Bearer ${token}`
}
// Request logging