-
Hello, is it possible now to make permanent (301) redirect from uppercased url into lowercased?
|
Beta Was this translation helpful? Give feedback.
Answered by
max-frai
Dec 9, 2020
Replies: 2 comments 1 reply
-
some middleware that does the following (in pseudo-rust): if !path.is_ascii_lowercase() {
return HttpRepsonse::MovedPermanently().header(header::Location, path.to_ascii_lowercase())
} else {
// continue service chain
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
In case someone also searching for this, here is complete middleware:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
max-frai
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In case someone also searching for this, here is complete middleware: