feat(packs): per-domain resource packs stored on Nextcloud, served at /pack/<domain>.zip
- api: /api/packs upload/list/delete (zip + pack.mcmeta check, SHA1), files go to Nextcloud WebDAV; public GET /pack/<domain>.zip streams from Nextcloud - nginx: unlimited body for /api/packs/, separate :81 server that only serves /pack/ - frontend: 리소스팩 page with upload progress and server.properties snippet - compose: NEXTCLOUD_* env from .env, 8081:81 mapping Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""MC Domain Filter 관리 API.
|
||||
|
||||
FastAPI 로 설정/도메인/로그/상태 4개 라우터를 노출한다. 인증은 없으니
|
||||
FastAPI 로 설정/도메인/로그/상태/리소스팩 라우터를 노출한다. 인증은 없으니
|
||||
공개 네트워크에 직접 노출하지 말 것 (nginx + basic auth 권장).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -11,6 +11,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
||||
from routes import config as config_routes
|
||||
from routes import domains as domain_routes
|
||||
from routes import logs as log_routes
|
||||
from routes import packs as pack_routes
|
||||
from routes import status as status_routes
|
||||
|
||||
app = FastAPI(title="MC Domain Filter API", version="0.1.0")
|
||||
@@ -26,6 +27,8 @@ app.include_router(config_routes.router, prefix="/api", tags=["config"])
|
||||
app.include_router(domain_routes.router, prefix="/api", tags=["domains"])
|
||||
app.include_router(log_routes.router, prefix="/api", tags=["logs"])
|
||||
app.include_router(status_routes.router, prefix="/api", tags=["status"])
|
||||
app.include_router(pack_routes.router, prefix="/api", tags=["packs"])
|
||||
app.include_router(pack_routes.public_router, tags=["packs"])
|
||||
|
||||
|
||||
@app.get("/health")
|
||||
|
||||
Reference in New Issue
Block a user