about summary refs log tree commit diff
path: root/src/frontend
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2021-09-27 17:39:43 +0300
committerVika <vika@fireburn.ru>2021-09-27 17:39:43 +0300
commit5e291ca70ca2712696fa5378894e4204679a5f7d (patch)
treeeed78a230982e6cc394dc47daa304ef8ace3f1ac /src/frontend
parentf894d1746b94d60cd22260b933948f4169ece9ae (diff)
downloadkittybox-5e291ca70ca2712696fa5378894e4204679a5f7d.tar.zst
Fix a bug in the error middleware
When an error is found, the site name passed to Storage::get_setting
in the error handler is incorrect. The ASCII serialisation of the
hostname should get used.
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs
index b974a93..37420ac 100644
--- a/src/frontend/mod.rs
+++ b/src/frontend/mod.rs
@@ -368,7 +368,7 @@ where
         let site_name = &request
             .state()
             .storage
-            .get_setting("site_name", &request.url().host().unwrap().to_string())
+            .get_setting("site_name", &(request.url().origin().ascii_serialization().clone() + "/"))
             .await
             .unwrap_or_else(|_| "Kitty Box!".to_string());
         let mut res = next.run(request).await;