Skip to content
Snippets Groups Projects
Verified Commit 16b0723a authored by Chris Wright's avatar Chris Wright Committed by Rémy Coutable
Browse files

Use the Gitlab Workhorse HTTP header in the admin dashboard


Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent ce03eba5
No related branches found
No related tags found
1 merge request!7332Use the Gitlab Workhorse HTTP header in the admin dashboard
Pipeline #
module ComponentsHelper
def gitlab_workhorse_version
if request.headers['Gitlab-Workhorse'].present?
request.headers['Gitlab-Workhorse'].split('-').first
else
Gitlab::Workhorse.version
end
end
end
Loading
@@ -87,7 +87,7 @@
Loading
@@ -87,7 +87,7 @@
%p %p
GitLab Workhorse GitLab Workhorse
%span.pull-right %span.pull-right
= Gitlab::Workhorse.version = gitlab_workhorse_version
%p %p
GitLab API GitLab API
%span.pull-right %span.pull-right
Loading
Loading
---
title: Use the Gitlab Workhorse HTTP header in the admin dashboard
merge_request:
author: Chris Wright
require 'spec_helper'
describe ComponentsHelper do
describe '#gitlab_workhorse_version' do
context 'without a Gitlab-Workhorse header' do
it 'shows the version from Gitlab::Workhorse.version' do
expect(helper.gitlab_workhorse_version).to eq Gitlab::Workhorse.version
end
end
context 'with a Gitlab-Workhorse header' do
before do
helper.request.headers['Gitlab-Workhorse'] = '42.42.0-rc3'
end
it 'shows the actual GitLab Workhorse version currently in use' do
expect(helper.gitlab_workhorse_version).to eq '42.42.0'
end
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment