Skip to content

Commit 32b8653

Browse files
committed
chore(config): 更新系统配置文件结构
- 将环境变量从 .env 迁移到 .file_classification_env - 新增数据库配置项 DATABASE_URL 和 DATABASE_TYPE - 添加 Web API 绑定地址和端口配置 - 引入日志级别和文件输出设置 - 启用 CORS 并配置允许的源地址 - 设置默认绑定地址为127.0.0.1 以提高安全性
1 parent 7bf9e21 commit 32b8653

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.env

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File Classification 系统配置文件
2+
# 数据库配置
3+
DATABASE_URL=file_classification.db
4+
DATABASE_TYPE=sqlite
5+
6+
# Web API 配置
7+
BIND_ADDRESS=127.0.0.1
8+
BIND_PORT=8082
9+
10+
# 日志配置
11+
RUST_LOG=info
12+
RUST_LOG_FILE=debug
13+
14+
# CORS 配置
15+
CORS_ENABLED=true
16+
CORS_ORIGIN=http://localhost:8082

0 commit comments

Comments
 (0)