🔧(backend) add MEDIA_BASE_URL setting

The frontend need to know the base url for the
media files, so we need to add a new setting
to the backend, in order to expose this value
to the frontend.
If the setting is not defined, the frontend current
domain will be used as the base url.
In production this setting do not need to be defined
since we have nginx capturing the media requests,
but in development we need to define it to target
the nginx server.
This commit is contained in:
Anthony LC
2024-11-15 11:31:09 +01:00
committed by Anthony LC
parent 0a37a8ea6d
commit 52dea8fa2f
4 changed files with 14 additions and 2 deletions

View File

@@ -902,6 +902,7 @@ class ConfigView(views.APIView):
"""
array_settings = [
"ENVIRONMENT",
"MEDIA_BASE_URL",
"LANGUAGES",
"LANGUAGE_CODE",
"SENTRY_DSN",