See https://docs.pylonsproject.org/projects/pyramid/en/latest/_modules/pyramid/csrf.html#check_csrf_origin for details.