Add asset proxy feature for resource URLs

Introduces asset proxy configuration and services to enable replacement of osu! resource URLs with custom domains. Updates API endpoints and caching services to process and rewrite resource URLs when asset proxy is enabled. Adds documentation and environment variables for asset proxy setup.
This commit is contained in:
咕谷酱
2025-08-22 22:03:51 +08:00
parent 1f40c6f70d
commit 6bcd8c1a21
11 changed files with 241 additions and 10 deletions

View File

@@ -66,6 +66,11 @@ async def lifespan(app: FastAPI):
start_stats_scheduler() # 启动统计调度器
schedule_online_status_maintenance() # 启动在线状态维护任务
load_achievements()
# 显示资源代理状态
if settings.enable_asset_proxy:
logger.info(f"Asset Proxy enabled - Domain: {settings.custom_asset_domain}")
# on shutdown
yield
bg_tasks.stop()