diff --git a/changelog.d/5848.feature b/changelog.d/5848.feature
new file mode 100644
index 0000000000000000000000000000000000000000..c1a09a4dcee5a938ac7e69e600994fd85e87eca2
--- /dev/null
+++ b/changelog.d/5848.feature
@@ -0,0 +1 @@
+Synapse will no longer serve any media repo admin endpoints when `enable_media_repo` is set to False in the configuration. If a media repo worker is used, the admin APIs relating to the media repo will be served from it instead.
\ No newline at end of file
diff --git a/synapse/config/repository.py b/synapse/config/repository.py
index db39697e45b180dac2ba1e95e7e4b220ef9a1acd..fdb1f246d0860f86447aaaa9469f554535a09599 100644
--- a/synapse/config/repository.py
+++ b/synapse/config/repository.py
@@ -93,7 +93,7 @@ class ContentRepositoryConfig(Config):
         # current worker app is the media repo.
         if (
             self.enable_media_repo is False
-            and config.worker_app != "synapse.app.media_repository"
+            and config.get("worker_app") != "synapse.app.media_repository"
         ):
             self.can_load_media_repo = False
             return