security: 安全审计修复 - API Key清理 + JWT改为HttpOnly Cookie
- API Key: run.md/.env/seed_model_providers.sql 中明文Key替换为占位符 - 认证: JWT从localStorage迁移到HttpOnly Cookie,移除后端body返回token - 前端: api.ts/knowledge/page.tsx/auth.ts 全面改用Cookie认证 - postcss XSS: package.json添加overrides强制升级到8.5.15 - gitignore: 添加server/.env和.env排除规则 - lint: 移除tenant.go中未使用的roleKey常量 - 文档: 新增docs/security-audit-report.md和hardware-requirements.md
This commit is contained in:
@@ -11,9 +11,8 @@ import (
|
||||
type contextKey string
|
||||
|
||||
const (
|
||||
orgIDKey contextKey = "org_id"
|
||||
userIDKey contextKey = "user_id"
|
||||
roleKey contextKey = "role"
|
||||
orgIDKey contextKey = "org_id"
|
||||
userIDKey contextKey = "user_id"
|
||||
)
|
||||
|
||||
// WithOrgID stores the organization ID in context.
|
||||
|
||||
Reference in New Issue
Block a user