diff --git a/api/funkwhale_api/music/views.py b/api/funkwhale_api/music/views.py
index d03b55e50fb16506102e43d2429fbae9b9fc172b..019525018890550a8697b0ce8c211ff1a4106080 100644
--- a/api/funkwhale_api/music/views.py
+++ b/api/funkwhale_api/music/views.py
@@ -238,7 +238,10 @@ class TrackFileViewSet(viewsets.ReadOnlyModelViewSet):
                 f.serve_from_source_path)
         response = Response()
         filename = f.filename
-        response['X-Accel-Redirect'] = file_path
+        if settings.USE_APACHE_HEADERS:
+            response['X-Sendfile'] = file_path
+        else:
+            response['X-Accel-Redirect'] = file_path
         filename = "filename*=UTF-8''{}".format(
             urllib.parse.quote(filename))
         response["Content-Disposition"] = "attachment; {}".format(filename)