Skip to content

Commit 37b9748

Browse files
committed
Revert "fixed to use solution already in main"
This reverts commit defe950.
1 parent defe950 commit 37b9748

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

server/api/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,10 @@
149149
MEDIA_ROOT = BASE_DIR/"media"
150150

151151
# The url to serve images and other media
152-
MEDIA_URL = "http://localhost:8000/media/"
152+
if DEBUG:
153+
MEDIA_URL = "http://localhost:8000/media/"
154+
else:
155+
MEDIA_URL = f"https://{ALLOWED_HOSTS[0]}/media/"
153156

154157
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
155158

0 commit comments

Comments
 (0)