I've successfully created a websocket on my Django(v. 2.0)-powered website using Django channels (v. 2.1.5).
Everything is fine but I'm wondering what about CSRF token. Is it needed in case of websockets? Documentation says that it's enough to use OriginValidator
to prevent such thread but I'd like to ensure that. I mean, what has happend to CSRF token? Am I just sending data through secure channel without it and backend automagically checks everything? And if that's so then why? And why simple views can't do that?
I know it's preety open question but I was not able to find any specific explanation, if anyone has one I'd more than greatful.