diff options
Diffstat (limited to 'app/controllers/opensearch_controller.rb')
-rw-r--r-- | app/controllers/opensearch_controller.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/opensearch_controller.rb b/app/controllers/opensearch_controller.rb new file mode 100644 index 00000000000..750f9a09982 --- /dev/null +++ b/app/controllers/opensearch_controller.rb @@ -0,0 +1,13 @@ +class OpensearchController < ApplicationController + skip_before_action :authenticate_user!, :reject_blocked! + + def index + render 'shared/opensearch.xml', locals: { + gitlab_host: Gitlab.config.gitlab.host, + favicon_path: ActionController::Base.helpers.asset_path('favicon.ico'), + search_url: URI.unescape(search_url(search: '{searchTerms}')), + description: "Search #{Appearance.first.title.truncate(1010)} GitLab", + long_name: "#{Appearance.first.title.truncate(34)} GitLab search" + } + end +end |