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
This commit is contained in:
commit
829d72d30a
1 changed files with 2 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue