diff options
-rw-r--r-- | app/assets/javascripts/search_autocomplete.js | 4 | ||||
-rw-r--r-- | changelogs/unreleased/sh-fix-search-relative-urls.yml | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/assets/javascripts/search_autocomplete.js b/app/assets/javascripts/search_autocomplete.js index 7bde4860973..ad4f5320ff8 100644 --- a/app/assets/javascripts/search_autocomplete.js +++ b/app/assets/javascripts/search_autocomplete.js @@ -226,7 +226,7 @@ export class SearchAutocomplete { icon, text: term, template: s__('SearchAutocomplete|in all GitLab'), - url: `/search?search=${term}`, + url: `${gon.relative_url_root}/search?search=${term}`, }); if (template) { @@ -234,7 +234,7 @@ export class SearchAutocomplete { icon, text: term, template, - url: `/search?search=${term}&project_id=${this.projectInputEl.val()}&group_id=${this.groupInputEl.val()}`, + url: `${gon.relative_url_root}/search?search=${term}&project_id=${this.projectInputEl.val()}&group_id=${this.groupInputEl.val()}`, }); } } diff --git a/changelogs/unreleased/sh-fix-search-relative-urls.yml b/changelogs/unreleased/sh-fix-search-relative-urls.yml new file mode 100644 index 00000000000..2545e9ca553 --- /dev/null +++ b/changelogs/unreleased/sh-fix-search-relative-urls.yml @@ -0,0 +1,5 @@ +--- +title: Fix search "all in GitLab" not working with relative URLs +merge_request: 22644 +author: +type: fixed |