pug - Jade equivalent for csrf token in Sails -
from examples, using default ejs engine, hidden input required csrf protection is:
<input type="hidden" name="_csrf" value="<%= _csrf %>" />
what jade equivalent? it:
input(type="hidden", name="_csrf", value='#{_csrf}')
thanks.
edit: i've tried both value='#{_csrf}'
, value=#{_csrf}
, i'm pretty sure neither correct don't display right csrf token.
try:
input(type="hidden", name="_csrf", value=_csrf)
that should output token you.
Comments
Post a Comment