File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,12 @@ ASTRBOT_SYSTEMD=1
8080# 默认 Default: True
8181ASTRBOT_DASHBOARD_ENABLE = True
8282
83+ # 允许跨域请求的来源域名(多个用逗号分隔,允许所有则用 *)
84+ # Allowed CORS origins for WebUI dashboard (comma-separated, or * for all)
85+ # 示例 Example: https://dash.astrbot.men
86+ # 默认 Default: *
87+ # ASTRBOT_CORS_ALLOW_ORIGIN="*"
88+
8389# ------------------------------------------
8490# 国际化配置 / Internationalization Configuration
8591# ------------------------------------------
Original file line number Diff line number Diff line change @@ -236,9 +236,9 @@ def _init_app(self):
236236 self .app .json .sort_keys = False
237237
238238 # 配置 CORS
239- # 支持通过环境变量 CORS_ALLOW_ORIGIN 配置允许的域名,多个域名用逗号分隔
239+ # 支持通过环境变量 ASTRBOT_CORS_ALLOW_ORIGIN 配置允许的域名,多个域名用逗号分隔
240240 # 如果前端使用 withCredentials:true,需要设置具体的域名而非 "*"
241- cors_allow_origin = os .environ .get ("CORS_ALLOW_ORIGIN " , "*" )
241+ cors_allow_origin = os .environ .get ("ASTRBOT_CORS_ALLOW_ORIGIN " , "*" )
242242 cors_allow_credentials = False
243243 if cors_allow_origin != "*" :
244244 cors_allow_origin = [
You can’t perform that action at this time.
0 commit comments