Created
October 26, 2018 16:15
-
-
Save laniltee/23118de8e65593b6b10e7c7a446f5ff6 to your computer and use it in GitHub Desktop.
token cookie
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function getTokenAndInject() { | |
const CSRF_TOKEN = Cookies.get('csrf-token'); | |
$("#contentForm").append( | |
`<input type="text" hidden name="inputToken" id="inputToken" value=${CSRF_TOKEN} />` | |
) | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment