Skip to content

Commit

Permalink
fix: routes with common prefixes may override each other
Browse files Browse the repository at this point in the history
  • Loading branch information
PhotonQuantum committed May 31, 2023
1 parent b31ac59 commit f19f312
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rsync-gateway/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::state::{listen_for_updates, State};

pub async fn configure(opts: &Opts) -> Result<impl Fn(&mut ServiceConfig) + Clone> {
let prefix_state: Arc<Vec<_>> = Arc::new(
future::try_join_all(opts.endpoints.iter().map(|(prefix, endpoint)| async {
future::try_join_all(opts.endpoints.iter().rev().map(|(prefix, endpoint)| async {
let prefix = prefix.trim_end_matches('/').to_string();
let redis = redis::Client::open(endpoint.redis.clone())?;
let conn = redis.get_multiplexed_tokio_connection().await?;
Expand Down

0 comments on commit f19f312

Please sign in to comment.