I'm having an issue with Craft 2.6 and the CSRF token. I enabled Csrf Protection in my general.php file by adding this line $config['*'] array so it looks like:
$config['*'] = [
...
'enableCsrfProtection' => true,
...
],
I also tried adding this line to the section for // Global variables after this array, but still no luck. I try to attach the token to the window object like this:
<script>
window.csrfTokenName = "{{ craft.config.csrfTokenName }}";
window.csrfTokenValue = "{{ craft.request.csrfTokenValue }}";
</script>
and the window.csrfTokenName = "CRAFT_CSRF_TOKEN";
but window.csrfTokenValue = "";
I can't figure out how else to get a csrf token and I can't find any documentation that says anything else. I'm just trying to see if I'm missing something really easy or if there is actually something else I need to add. Any help is greatly appreciated!