Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Koltsov <gkoltsov@gitlab.com>2019-08-15 12:11:35 +0300
committerGeorge Koltsov <gkoltsov@gitlab.com>2019-08-15 12:11:35 +0300
commit2857a40950d23173e4280513a5f318b89d1d0a11 (patch)
tree6f4d60654169b1a05832afab5aac2e5783ee203f
parent879bcaac2644a5e16190b8fa4a3776f1d93c3820 (diff)
Swap clauses as per code review suggestion
-rw-r--r--app/controllers/application_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index 3bb19e8628a..5e65084a110 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -116,7 +116,7 @@ class ApplicationController < ActionController::Base
def render(*args)
super.tap do
# Set a header for custom error pages to prevent them from being intercepted by gitlab-workhorse
- if workhorse_excluded_content_types.include?(response.content_type) && (400..599).cover?(response.status)
+ if (400..599).cover?(response.status) && workhorse_excluded_content_types.include?(response.content_type)
response.headers['X-GitLab-Custom-Error'] = '1'
end
end