Django CSRF cookie accessible by javascript?
On django website, https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ it states: The CSRF protection is based on the following things: 1. A CSRF cookie that is set to a random value (a session independent nonce, as it is called), which other sites will not have access to. 2. ... Then, it also states the csrf token can be obtained from cookie by javascript: var csrftoken = $.cookie('csrftoken'); Aren't these two statements conflicting? Say there is a Cross Origin attack, then the attacker can just obtain the CSRF token from cookie, and then make a POST request with the CSRF token in the