Commit ccac5c96 authored by Marin Jankovski's avatar Marin Jankovski Committed by Marin Jankovski

Merge branch 'static-middleware' into 'master'

Change check to only swap static middleware when it's enabled.

Fixes problem with #1553.

cc @marin

See merge request !1565
parent ebb560ca
begin
app = Rails.application
app = Rails.application
if app.config.serve_static_assets
# The `ActionDispatch::Static` middleware intercepts requests for static files
# by checking if they exist in the `/public` directory.
# We're replacing it with our `Gitlab::Middleware::Static` that does the same,
......@@ -12,7 +12,4 @@ begin
app.paths["public"].first,
app.config.static_cache_control
)
rescue
# If ActionDispatch::Static wasn't loaded onto the stack (like in production),
# an exception is raised.
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment