Merge pull request #457 from fastapiadmin/dev

Dev
This commit is contained in:
fastapiadmin
2026-06-18 01:45:36 +08:00
committed by GitHub
4 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ class Settings(BaseSettings):
# ******************** 跨域配置 ******************** # # ******************** 跨域配置 ******************** #
# ================================================= # # ================================================= #
CORS_ORIGIN_ENABLE: bool = True # 是否启用跨域 CORS_ORIGIN_ENABLE: bool = True # 是否启用跨域
ALLOW_ORIGINS: list[str] = ["http://localhost:5173", "http://localhost:4173", "http://127.0.0.1:5173", "http://localhost:5180", "http://127.0.0.1:5180"] # 允许的域名列表 ALLOW_ORIGINS: list[str] = ["*"] # 允许的域名列表
ALLOW_METHODS: list[str] = ["*"] # 允许的HTTP方法 ALLOW_METHODS: list[str] = ["*"] # 允许的HTTP方法
ALLOW_HEADERS: list[str] = ["*"] # 允许的请求头 ALLOW_HEADERS: list[str] = ["*"] # 允许的请求头
ALLOW_CREDENTIALS: bool = True # 是否允许携带cookie ALLOW_CREDENTIALS: bool = True # 是否允许携带cookie
+1 -1
View File
@@ -11,7 +11,7 @@
{ {
"config_name": "演示访问IP白名单", "config_name": "演示访问IP白名单",
"config_key": "ip_white_list", "config_key": "ip_white_list",
"config_value": "[\"127.0.0.1\", \"::1\"]", "config_value": "[\"127.0.0.1\", \"223.104.209.37\"]",
"config_type": true, "config_type": true,
"status": 0, "status": 0,
"description": "演示模式下允许访问的IP列表", "description": "演示模式下允许访问的IP列表",
+1
View File
@@ -44,6 +44,7 @@ REDIS_DB_NAME = 1
LOGGER_LEVEL = "DEBUG" # 日志级别 LOGGER_LEVEL = "DEBUG" # 日志级别
# 大模型配置 # 大模型配置
OPENAI_BASE_URL = "https://api.minimax.chat"
OPENAI_API_KEY = "your_api_key" OPENAI_API_KEY = "your_api_key"
OPENAI_MODEL = "deepseek-v4-flash" OPENAI_MODEL = "deepseek-v4-flash"
+2 -1
View File
@@ -20,7 +20,7 @@ ROOT_PATH = "/api/v1" # API路由前缀
DESCRIPTION = "该项目是一个基于python的web服务框架,基于fastapi和sqlalchemy实现。" # 文档描述 DESCRIPTION = "该项目是一个基于python的web服务框架,基于fastapi和sqlalchemy实现。" # 文档描述
# 是否启用演示模式 # 是否启用演示模式
DEMO_ENABLE = False DEMO_ENABLE = True
# 数据库配置 # 数据库配置
DATABASE_TYPE = "mysql" # mysql、postgres、sqlite、dm(sqlite、dm不支持代码生成) DATABASE_TYPE = "mysql" # mysql、postgres、sqlite、dm(sqlite、dm不支持代码生成)
@@ -44,6 +44,7 @@ REDIS_DB_NAME = 1
LOGGER_LEVEL = 'INFO' LOGGER_LEVEL = 'INFO'
# 大模型配置 # 大模型配置
OPENAI_BASE_URL = "https://api.minimax.chat"
OPENAI_API_KEY = "your_api_key" OPENAI_API_KEY = "your_api_key"
OPENAI_MODEL = "deepseek-v4-flash" OPENAI_MODEL = "deepseek-v4-flash"