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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -