MCPcopy Index your code
hub / github.com/PostHog/posthog / process_view

Method process_view

posthog/middleware.py:86–91  ·  view source on GitHub ↗
(self, request, callback, callback_args, callback_kwargs)

Source from the content-addressed store, hash-verified

84 """Middleware accepting requests that either contain a valid CSRF token or a personal API key."""
85
86 def process_view(self, request, callback, callback_args, callback_kwargs):
87 result = super().process_view(request, callback, callback_args, callback_kwargs) # None if request accepted
88 # if super().process_view did not find a valid CSRF token, try looking for a personal API key
89 if result is not None and PersonalAPIKeyAuthentication.find_key_with_source(request) is not None:
90 return self._accept(request)
91 return result
92
93 def _accept(self, request):
94 request.csrf_processing_done = True

Callers

nothing calls this directly

Calls 2

_acceptMethod · 0.95
find_key_with_sourceMethod · 0.80

Tested by

no test coverage detected