ASGI wrapper plugins that themselves set the actor scope variable should be respected (though actor_from_request plugins should still execute and get the chance to replace that initial actor value).
Relevant code:
|
# Handle authentication |
|
actor = None |
|
for actor in pm.hook.actor_from_request( |
|
datasette=self.ds, request=Request(scope, receive) |
|
): |
|
if callable(actor): |
|
actor = actor() |
|
if asyncio.iscoroutine(actor): |
|
actor = await actor |
|
if actor: |
|
break |
|
scope_modifications["actor"] = actor |
ASGI wrapper plugins that themselves set the
actorscope variable should be respected (thoughactor_from_requestplugins should still execute and get the chance to replace that initialactorvalue).Relevant code:
datasette/datasette/app.py
Lines 910 to 921 in 09a3479