Skip to content

Actix Web Middleware URI Rewrite Not Affecting Routing — Dynamic Path Parsing Issue #3610

Closed Answered by bxffour
bxffour asked this question in Q&A
Discussion options

You must be logged in to vote

Modifying the route processing logic resolved this issue

    req.match_info_mut().get_mut().update(&new_uri);
    req.head_mut().uri = new_uri;

Referenced the NormalizePath middleware implementation for this.
Ref:

req.match_info_mut().get_mut().update(&uri);
req.head_mut().uri = uri;

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bxffour
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant