forked from mirror/MrDoc
系统配置默认自带移动端APP所需的跨域白名单
This commit is contained in:
parent
cfb6a8d9d9
commit
833d9f8db2
@ -247,7 +247,8 @@ DATA_UPLOAD_MAX_MEMORY_SIZE = None
|
||||
|
||||
# 跨域请求配置
|
||||
cors_str = CONFIG.get("cors_origin","allow",fallback=[])
|
||||
capacitor_origins = ['http://localhost','capacitor://localhost']
|
||||
if cors_str == []:
|
||||
CORS_ALLOWED_ORIGINS = cors_str
|
||||
CORS_ALLOWED_ORIGINS = capacitor_origins
|
||||
else:
|
||||
CORS_ALLOWED_ORIGINS = cors_str.split(',')
|
||||
CORS_ALLOWED_ORIGINS = capacitor_origins + cors_str.split(',')
|
Loading…
Reference in New Issue
Block a user