's'
This commit is contained in:
@@ -27,14 +27,25 @@ XORPAY_CASHIER_URL = os.getenv("XORPAY_CASHIER_URL", "https://xorpay.com/api/cas
|
|||||||
ZPAY_PID = os.getenv("ZPAY_PID", "2025121809351743")
|
ZPAY_PID = os.getenv("ZPAY_PID", "2025121809351743")
|
||||||
ZPAY_KEY = os.getenv("ZPAY_KEY", "tpEi7wWIWI2kXiYVTpIG6j7it0mjVW89")
|
ZPAY_KEY = os.getenv("ZPAY_KEY", "tpEi7wWIWI2kXiYVTpIG6j7it0mjVW89")
|
||||||
|
|
||||||
# PocketBase(支持 PB_ADMIN_* 或 POCKETBASE_*,空值时用默认)
|
# PocketBase(支持 PB_ADMIN_* 或 POCKETBASE_*)
|
||||||
# 生产同机部署默认走本机 8090,避免公网域名解析抖动导致验证失败。
|
# 为了避免线上环境遗留 PB_URL=公网域名导致慢查询,默认强制优先本机。
|
||||||
PB_URL = (
|
_pb_internal = os.getenv("PB_INTERNAL_URL") or os.getenv("POCKETBASE_INTERNAL_URL")
|
||||||
os.getenv("PB_INTERNAL_URL")
|
_pb_explicit = os.getenv("PB_URL") or os.getenv("POCKETBASE_URL")
|
||||||
or os.getenv("PB_URL")
|
if _pb_internal:
|
||||||
or os.getenv("POCKETBASE_URL")
|
PB_URL = _pb_internal
|
||||||
or "http://127.0.0.1:8090"
|
elif _pb_explicit and (
|
||||||
)
|
"127.0.0.1" in _pb_explicit
|
||||||
|
or "localhost" in _pb_explicit
|
||||||
|
or _pb_explicit.startswith("http://10.")
|
||||||
|
or _pb_explicit.startswith("https://10.")
|
||||||
|
or _pb_explicit.startswith("http://172.")
|
||||||
|
or _pb_explicit.startswith("https://172.")
|
||||||
|
or _pb_explicit.startswith("http://192.168.")
|
||||||
|
or _pb_explicit.startswith("https://192.168.")
|
||||||
|
):
|
||||||
|
PB_URL = _pb_explicit
|
||||||
|
else:
|
||||||
|
PB_URL = "http://127.0.0.1:8090"
|
||||||
PB_ADMIN_EMAIL = (
|
PB_ADMIN_EMAIL = (
|
||||||
os.getenv("PB_ADMIN_EMAIL") or os.getenv("POCKETBASE_EMAIL") or "xiaoshuang.eric@gmail.com"
|
os.getenv("PB_ADMIN_EMAIL") or os.getenv("POCKETBASE_EMAIL") or "xiaoshuang.eric@gmail.com"
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user