Skip to content

Instantly share code, notes, and snippets.

@stanpalatnik
Created April 2, 2012 21:49
Show Gist options
  • Save stanpalatnik/2287475 to your computer and use it in GitHub Desktop.
Save stanpalatnik/2287475 to your computer and use it in GitHub Desktop.
csrf example
<form id="form" name="form" method="post" action="/signin">
<h1>Sign-in form</h1>
<div><label>Username
</label>
<input type="text" name="user[username]" class="required" id="username"/></div>
<div>
<input type="password" name="user[password]" class="required" id="password"/></div>
<input type="hidden" name="_csrf" value={_csrf} id="_csrf"/>
<button type="submit">Sign-in</button>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment