From 2857a40950d23173e4280513a5f318b89d1d0a11 Mon Sep 17 00:00:00 2001 From: George Koltsov Date: Thu, 15 Aug 2019 10:11:35 +0100 Subject: Swap clauses as per code review suggestion --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') 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 -- cgit v1.2.3