提交 2857a409 编写于 作者: G George Koltsov

Swap clauses as per code review suggestion

上级 879bcaac
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册