mirror of
https://github.com/actix/examples
synced 2025-06-29 02:10:36 +02:00
Escape HTML (#366)
This commit is contained in:
@ -33,7 +33,14 @@ async fn main() -> io::Result<()> {
|
||||
let app = move || {
|
||||
debug!("Constructing the App");
|
||||
|
||||
let templates: Tera = Tera::new("templates/**/*").unwrap();
|
||||
let mut templates = match Tera::new("templates/**/*") {
|
||||
Ok(t) => t,
|
||||
Err(e) => {
|
||||
println!("Parsing error(s): {}", e);
|
||||
::std::process::exit(1);
|
||||
}
|
||||
};
|
||||
templates.autoescape_on(vec!["tera"]);
|
||||
|
||||
let session_store = CookieSession::signed(SESSION_SIGNING_KEY).secure(false);
|
||||
|
||||
|
Reference in New Issue
Block a user