feat(config): derive MusicBrainz/AcoustID User-Agent from app name+version
Docker Build & Publish / build (push) Successful in 1m8s
Docker Build & Publish / push (push) Failing after 6s
Docker Build & Publish / Prune old image versions (push) Has been skipped

Replace the placeholder MUSICBRAINZ_USER_AGENT env var with
MUSICBRAINZ_OWNER_EMAIL. The User-Agent ("MCMA/<version> ( <contact> )")
is now composed from the fixed app name, the installed package version,
and the operator's contact email — falling back to the project URL when
no email is configured. Also use the same version for the FastAPI app.
This commit is contained in:
Senko-san
2026-06-11 00:39:24 +03:00
parent 356cd00772
commit c7e078d758
3 changed files with 33 additions and 4 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ from app.api.health import router as health_router
from app.api.middleware import CorrelationIdMiddleware
from app.api.rest import subsonic_router
from app.api.v1 import api_v1_router
from app.core.config import get_settings
from app.core.config import app_version, get_settings
from app.core.logging import configure_logging, get_logger
from app.infrastructure.cache import close_redis
from app.infrastructure.db import dispose_engine
@@ -34,7 +34,7 @@ def create_app() -> FastAPI:
app = FastAPI(
title="mcma-backend",
version="0.1.0",
version=app_version(),
summary="Self-hosted, offline-first music service.",
lifespan=lifespan,
)