Skip to main content

with_csrf_meta

Function with_csrf_meta 

Source
pub fn with_csrf_meta(document: &str, token: &str) -> String
Expand description

document carrying token in its head as <meta name="csrf-token">. The meta opens the head, so a page’s own Head: merges over it by identity like every other head element. A document with no <head> is returned as it is.