Compare commits

..

2 Commits

Author SHA1 Message Date
golc bc8c265cd3 docs: 更新环境变量配置模板
- 添加 GROK_BASE_URL 配置说明

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:08:25 +00:00
golc c3284ac01b security: 移除所有硬编码的敏感信息
- 使用环境变量替代硬编码的数据库密码
- 使用环境变量替代硬编码的 API 地址
- 更新 .env.example 添加 GROK_BASE_URL 配置

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 14:03:57 +00:00
3 changed files with 10 additions and 6 deletions

View File

@ -18,3 +18,6 @@ FEISHU_APP_SECRET=your_feishu_app_secret
SILICONFLOW_API_KEY=your_siliconflow_api_key SILICONFLOW_API_KEY=your_siliconflow_api_key
DEEPSEEK_API_KEY=your_deepseek_api_key DEEPSEEK_API_KEY=your_deepseek_api_key
GROK_API_KEY=your_grok_api_key GROK_API_KEY=your_grok_api_key
# Grok API Base URL (optional)
GROK_BASE_URL=https://api.x.ai

View File

@ -1,13 +1,14 @@
const mysql = require('mysql2/promise'); const mysql = require('mysql2/promise');
require('dotenv').config();
async function checkSchema() { async function checkSchema() {
try { try {
const connection = await mysql.createConnection({ const connection = await mysql.createConnection({
host: '192.144.32.178', host: process.env.SERVER_HOST,
port: 3306, port: process.env.SERVER_PORT || 3306,
user: 'root', user: process.env.SERVER_USER,
password: 'lichao1314', password: process.env.PASSWORD,
database: 'auth_db' database: process.env.DB_NAME
}); });
console.log('🔍 检查当前 user 表结构:'); console.log('🔍 检查当前 user 表结构:');

View File

@ -11,7 +11,7 @@ export const PROVIDER_TYPE = {
}, },
Grok: { Grok: {
name: 'Grok', name: 'Grok',
baseUrl: 'http://141.98.197.39:8000', baseUrl: process.env.GROK_BASE_URL || 'https://api.x.ai',
model: 'grok-4.20-beta', model: 'grok-4.20-beta',
}, },
}; };