Answer the question
In order to leave comments, you need to log in
How does Django's csrf token encode?
If there is a django backend, then the first time you visit any page, django generates a csrf token in the cookie. It is not clear to me how this token is generated and on the basis of what.
My thoughts:
there is a SECRET_KEY value in settings.py. On first contact between django and the browser, django encodes this SECRET_KEY using an md5 encryption algorithm. I tried to encode SECRET_KEY with several popular algorithms (there are many online services like sha1-online.com on the Internet), but I did not get a value equal to the csrf token that is stored in my cookies Please help me
understand on the basis of what the csrf token is encoded and how exactly algorithm
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question