Skip to content

Commit

Permalink
fix: redundant / added at end of forward url in proxy if rest is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
18o committed Jan 19, 2024
1 parent 0e526ad commit 27021cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/proxy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ where
format!("{}{}", upstream.trim_end_matches('/'), rest)
} else if upstream.ends_with('/') || rest.starts_with('/') {
format!("{}{}", upstream, rest)
} else if rest.is_empty() {
upstream.to_string()
} else {
format!("{}/{}", upstream, rest)
};
Expand Down

0 comments on commit 27021cf

Please sign in to comment.