mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-02 04:37:35 +03:00
feat: allow for case-insensitive search redirects (fix #389)
This commit is contained in:
parent
35688e4af7
commit
f3ca7bb7d1
1 changed files with 2 additions and 2 deletions
|
@ -71,11 +71,11 @@ pub async fn find(req: Request<Body>) -> Result<Response<Body>, String> {
|
|||
return Ok(redirect("/"));
|
||||
}
|
||||
|
||||
if query.starts_with("r/") || query.starts_with("user/") {
|
||||
if query.starts_with("r/") || query.starts_with("R/") || query.starts_with("user/") {
|
||||
return Ok(redirect(&format!("/{query}")));
|
||||
}
|
||||
|
||||
if query.starts_with("u/") {
|
||||
if query.starts_with("u/") || query.starts_with("U/") {
|
||||
return Ok(redirect(&format!("/user{}", &query[1..])));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue