update pay ui

This commit is contained in:
2025-12-15 08:24:16 +08:00
parent f1603977f4
commit db351ae494
2 changed files with 4 additions and 4 deletions

2
app.py
View File

@@ -189,7 +189,7 @@ print("✅ ProxyFix 已配置Flask 将信任反向代理头X-Forwarded-Pro
# ============ Redis 连接配置(支持环境变量覆盖) ============
_REDIS_HOST = os.environ.get('REDIS_HOST', 'localhost')
_REDIS_PORT = int(os.environ.get('REDIS_PORT', 6379))
_REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD', 'VF_Redis_Secure_2024!') # Redis 密码(安全加固)
_REDIS_PASSWORD = os.environ.get('REDIS_PASSWORD', 'VF_Redis_2024') # Redis 密码(安全加固)
redis_client = redis.Redis(host=_REDIS_HOST, port=_REDIS_PORT, db=0, password=_REDIS_PASSWORD, decode_responses=True)
print(f"📦 Redis 配置: {_REDIS_HOST}:{_REDIS_PORT}/db=0 (已启用密码认证)")

View File

@@ -575,7 +575,7 @@ class TokenStore:
return
self._initialized = True
redis_url = os.environ.get('REDIS_URL', 'redis://:VF_Redis_Secure_2024!@localhost:6379/0')
redis_url = os.environ.get('REDIS_URL', 'redis://:VF_Redis_2024@localhost:6379/0')
try:
import redis
self._redis_client = redis.from_url(redis_url)
@@ -676,7 +676,7 @@ JWT_EXPIRATION_HOURS = 24 * 7 # Token有效期7天
# Session 配置
# 优先使用 Redis支持多 worker 共享),否则回退到文件系统
_REDIS_URL = os.environ.get('REDIS_URL', 'redis://:VF_Redis_Secure_2024!@localhost:6379/0')
_REDIS_URL = os.environ.get('REDIS_URL', 'redis://:VF_Redis_2024@localhost:6379/0')
_USE_REDIS_SESSION = os.environ.get('USE_REDIS_SESSION', 'true').lower() == 'true'
try:
@@ -4170,7 +4170,7 @@ def get_wechat_access_token(force_refresh=False):
redis_client = None
try:
import redis
redis_client = redis.from_url(os.environ.get('REDIS_URL', 'redis://:VF_Redis_Secure_2024!@localhost:6379/0'))
redis_client = redis.from_url(os.environ.get('REDIS_URL', 'redis://:VF_Redis_2024@localhost:6379/0'))
# 如果不是强制刷新,尝试从 Redis 获取缓存的 token
if not force_refresh: