ASGI middleware for protecting against CSRF attacks
copied from cf-staging / asgi-csrfThis middleware implements the Double Submit Cookie pattern, where a cookie is set that is then compared to a csrftoken hidden form field or a x-csrftoken HTTP header.