From 32f9b3d3af0ea3e7c132bc705ef9d4ddf5b0aa56 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 1 Aug 2023 14:52:32 +0200 Subject: [PATCH] Change /api/v1/peers/search to be case-insensitive when using Elasticsearch (#26268) --- app/controllers/api/v1/peers/search_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/peers/search_controller.rb b/app/controllers/api/v1/peers/search_controller.rb index 50a342cde3..bd72b985f6 100644 --- a/app/controllers/api/v1/peers/search_controller.rb +++ b/app/controllers/api/v1/peers/search_controller.rb @@ -27,7 +27,7 @@ class Api::V1::Peers::SearchController < Api::BaseController @domains = InstancesIndex.query(function_score: { query: { prefix: { - domain: params[:q], + domain: TagManager.instance.normalize_domain(params[:q].strip), }, },