feat(config): derive MusicBrainz/AcoustID User-Agent from app name+version
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:
+2
-2
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user