Add geoip data and 451 handler
This commit is contained in:
1 parent
7ac69b59af
commit
98160a8023
9 files changed
+25436
-9
No files matched your search
@@ -29,6 +29,12 @@ pub(crate) async fn not_found() -> Template {
|
||||
Template::render("errors/404", &map)
|
||||
}
|
||||
|
||||
#[catch(451)]
|
||||
pub(crate) async fn legal_reasons() -> Template {
|
||||
let map: HashMap<String, String> = HashMap::new();
|
||||
Template::render("errors/451", &map)
|
||||
}
|
||||
|
||||
#[catch(413)]
|
||||
pub(crate) async fn payload_too_large() -> JsonValue {
|
||||
json!({"error": "Data too large.", "errors": ["Data too large."]})
|
||||
|
||||
Reference in new issue
Block a user