summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-10-27 21:11:55 -0700
committerStan Hu <stanhu@gmail.com>2018-10-28 14:09:19 -0700
commit01dbf70687f08e50db34fc1fd323b449d5323e32 (patch)
tree5efb70a546ada8df9233c05193842f99609a0164
parente997b22df50a46759cac9936a6557993310f8888 (diff)
downloadgitlab-ce-01dbf70687f08e50db34fc1fd323b449d5323e32.tar.gz
Fix search "all in GitLab" not working with relative URLssh-fix-search-relative-urls
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53259
-rw-r--r--app/assets/javascripts/search_autocomplete.js4
-rw-r--r--changelogs/unreleased/sh-fix-search-relative-urls.yml5
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