code: def skip_csrf(scope):
      # Skip CSRF check for requests with content-type: application/json
      if scope["type"] == "http":
          headers = scope.get("headers") or {}
          if dict(headers).get(b"content-type") == b"application/json":
              return True
  
file_path: datasette/datasette/default_permissions.py
imports: from datasette import hookimpl, Permission
  from datasette.utils import actor_matches_allow
  import itsdangerous
  import time
  from typing import Union, Tuple
label_desc: Use image node_id 6 for calling a global function with example usage: skip_csrf(scope) and returns: True