Commit 82055bb7 authored by Felipe Artur's avatar Felipe Artur Committed by Rémy Coutable

Load 'Gitlab::Jira::Middleware' if it exists

Loads 'Gitlab::Jira::Middleware' only if it exists
so this initializer can be backported to CE.
parent e8411f02
# Treats JIRA DVCS user agent requests in order to be successfully handled # frozen_string_literal: true
# Changes JIRA DVCS user agent requests in order to be successfully handled
# by our API. # by our API.
Rails.application.config.middleware.use(Gitlab::Jira::Middleware) #
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment