diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-01 11:55:53 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-01 11:55:53 +0300 |
commit | f7e95de064cdfb25f0a15c729605cdb0d5112b81 (patch) | |
tree | 12db6fd13fd735b20a83892c68454f2896848a12 | |
parent | 093629fedc43e8b481c6626765e3fcf0603add17 (diff) | |
parent | 0a6478d159cc7ff5d3877780cf30a061ebaf4dac (diff) |
Merge branch 'ce_issue_10672' into 'master'
[CE] - Load 'Gitlab::Jira::Middleware' if it exists
See merge request gitlab-org/gitlab-ce!26665
-rw-r--r-- | config/initializers/jira.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/initializers/jira.rb b/config/initializers/jira.rb new file mode 100644 index 00000000000..05f784a6a2a --- /dev/null +++ b/config/initializers/jira.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +# Changes JIRA DVCS user agent requests in order to be successfully handled +# by our API. +# +# Gitlab::Jira::Middleware is only defined on EE +# +# Use safe_constantize because the class may exist but has not been loaded yet +if "Gitlab::Jira::Middleware".safe_constantize + Rails.application.config.middleware.use(Gitlab::Jira::Middleware) +end |