2015-02-20 11:44:07 +00:00
|
|
|
begin
|
|
|
|
app = Rails.application
|
|
|
|
|
|
|
|
app.config.middleware.swap(
|
|
|
|
ActionDispatch::Static,
|
|
|
|
Gitlab::Middleware::Static,
|
|
|
|
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.
|
2015-02-20 13:39:35 +00:00
|
|
|
end
|