Skip to content

Commit

Permalink
fix: append a / to the search link. (#432)
Browse files Browse the repository at this point in the history
Most hosting providers HTTP redirect `mysite.com/docs/search?q=test` to `mysite.com/docs/search/?q=test`... except S3 which tosses out the query string and redirects to `mysite.com/docs/search/`.

Rather than relying on the backend redirect to work, tweak the link here on the frontend to already contain the slash suffixed path.
  • Loading branch information
aduros authored Jul 8, 2024
1 parent c359957 commit 60c23d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export default function SearchBar({
}
params.set("version", versionUrl.substring(baseUrl.length));
}
const url = `${baseUrl}search?${params.toString()}`;
const url = `${baseUrl}search/?${params.toString()}`;
a.href = url;
a.textContent = linkText;
a.addEventListener("click", (e) => {
Expand Down

0 comments on commit 60c23d4

Please sign in to comment.