From a74da2fb1b460a6a390252e37c14de0835413c25 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 21 Oct 2020 15:21:30 +0500 Subject: [PATCH] Handlebars strict mode --- src/web.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/web.rs b/src/web.rs index 3be9277..fefa328 100644 --- a/src/web.rs +++ b/src/web.rs @@ -21,7 +21,9 @@ pub fn rocket(config: &config::Config) -> Result { .manage(i18n) .manage(database::create_db_pool(config)) .attach(rocket_csrf::Fairing::new()) - .attach(Template::fairing()) + .attach(Template::custom(|engines| { + engines.handlebars.set_strict_mode(true); + })) .mount("/", routes::routes()) .mount("/", StaticFiles::new(public_path, ServeOptions::None));