mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
register the event to continue the local redirection
This commit is contained in:
parent
01a2021fa2
commit
21c8402004
1 changed files with 10 additions and 9 deletions
|
|
@ -42,16 +42,17 @@ impl Nex {
|
|||
let path = uri.path(); // copy once
|
||||
|
||||
if path.is_empty() {
|
||||
// auto-append trailing slash to the root locations
|
||||
let mut r = uri.to_string();
|
||||
r.push('/'); // auto-append trailing slash to the root locations
|
||||
self.page.navigation.request.info.replace(
|
||||
r.push('/');
|
||||
// apply the permanent redirection
|
||||
let mut i = self.page.navigation.request.info.take();
|
||||
i.add_event("Canonicalize root request".to_string());
|
||||
self.page
|
||||
.navigation
|
||||
.request
|
||||
.info
|
||||
.take()
|
||||
.into_permanent_redirect(),
|
||||
);
|
||||
.replace(i.into_permanent_redirect());
|
||||
self.page.navigation.set_request(&r);
|
||||
self.page.item_action.load.activate(Some(&r), false, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue