summaryrefslogtreecommitdiff
path: root/config/initializers/static_files.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/initializers/static_files.rb')
-rw-r--r--config/initializers/static_files.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/config/initializers/static_files.rb b/config/initializers/static_files.rb
index 3cdb5a5abcf..2879d48387d 100644
--- a/config/initializers/static_files.rb
+++ b/config/initializers/static_files.rb
@@ -2,6 +2,10 @@
app = Rails.application
+# Disable Sendfile for Sidekiq Web assets since Workhorse won't
+# always have access to these files.
+app.config.middleware.insert_before(Rack::Sendfile, Gitlab::Middleware::SidekiqWebStatic)
+
if app.config.public_file_server.enabled
# The `ActionDispatch::Static` middleware intercepts requests for static files
# by checking if they exist in the `/public` directory.