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:
authorChris Wright <chris@dxw.com>2016-08-30 23:44:30 +0300
committerRémy Coutable <remy@rymai.me>2016-11-07 18:15:43 +0300
commit16b0723a7ce709437084c12647e59b3a73479ddf (patch)
treea419356d6a83874ab86e8af35b95f990de52851c /app/helpers/components_helper.rb
parentce03eba57993fb0846c3a164b3eb757dd0a4e0a3 (diff)
Use the Gitlab Workhorse HTTP header in the admin dashboard
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'app/helpers/components_helper.rb')
-rw-r--r--app/helpers/components_helper.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/components_helper.rb b/app/helpers/components_helper.rb
new file mode 100644
index 00000000000..8893209b314
--- /dev/null
+++ b/app/helpers/components_helper.rb
@@ -0,0 +1,9 @@
+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