| Did you know ... | Search Documentation: |
| csrf.pl -- Protect against cross-site request forgery |
Handlers that change state on behalf of a logged in user call
csrf_check/1 before doing anything. We do not use tokens, but verify the
request was initiated from our own site. Modern browsers send the
Sec-Fetch-Site header, which cannot be set by scripts. For browsers
that do not, we fall back to the Origin or Referer header.
Requests without any of these headers are refused. Note that this
implies that state-changing links cannot be used from bookmarks or
mail, as browsers send Sec-Fetch-Site: none for these.
csrf_check(+Request) is det