diff options
Diffstat (limited to 'config/application.rb')
-rw-r--r-- | config/application.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb index 5cc9a347d9e..eb84b274c6b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -28,6 +28,7 @@ module Gitlab require_dependency Rails.root.join('lib/gitlab/redis/sessions') require_dependency Rails.root.join('lib/gitlab/current_settings') require_dependency Rails.root.join('lib/gitlab/middleware/read_only') + require_dependency Rails.root.join('lib/gitlab/middleware/compressed_json') require_dependency Rails.root.join('lib/gitlab/middleware/basic_health_check') require_dependency Rails.root.join('lib/gitlab/middleware/same_site_cookies') require_dependency Rails.root.join('lib/gitlab/middleware/handle_ip_spoof_attack_error') @@ -319,6 +320,8 @@ module Gitlab config.middleware.insert_after Rack::Sendfile, ::Gitlab::Middleware::RackMultipartTempfileFactory + config.middleware.insert_before Rack::Runtime, ::Gitlab::Middleware::CompressedJson + # Allow access to GitLab API from other domains config.middleware.insert_before Warden::Manager, Rack::Cors do headers_to_expose = %w[Link X-Total X-Total-Pages X-Per-Page X-Page X-Next-Page X-Prev-Page X-Gitlab-Blob-Id X-Gitlab-Commit-Id X-Gitlab-Content-Sha256 X-Gitlab-Encoding X-Gitlab-File-Name X-Gitlab-File-Path X-Gitlab-Last-Commit-Id X-Gitlab-Ref X-Gitlab-Size] |