Skip to content
Snippets Groups Projects
Commit 2857a409 authored by George Koltsov's avatar George Koltsov
Browse files

Swap clauses as per code review suggestion

parent 879bcaac
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment