mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-12-22 19:21:08 +00:00
fix content type
This commit is contained in:
parent
e5597399b6
commit
2b11d0522c
|
@ -118,7 +118,7 @@ processors = {
|
|||
|
||||
|
||||
async def inbox(request):
|
||||
data = await request.json(content_type=None)
|
||||
data = await request.json()
|
||||
|
||||
if 'actor' not in data or not request['validated']:
|
||||
raise aiohttp.web.HTTPUnauthorized(body='access denied', content_type='text/plain')
|
||||
|
|
|
@ -102,7 +102,7 @@ async def http_signatures_middleware(app, handler):
|
|||
request['validated'] = False
|
||||
|
||||
if 'signature' in request.headers:
|
||||
data = await request.json(content_type=None)
|
||||
data = await request.json()
|
||||
if 'actor' not in data:
|
||||
raise aiohttp.web.HTTPUnauthorized(body='signature check failed, no actor in message')
|
||||
|
||||
|
|
|
@ -9,6 +9,6 @@ async def fetch_actor(uri, force=False):
|
|||
|
||||
async with aiohttp.ClientSession() as session:
|
||||
async with session.get(uri, headers={'Accept': 'application/activity+json'}) as resp:
|
||||
ACTORS[uri] = (await resp.json())
|
||||
ACTORS[uri] = (await resp.json(content_type=None))
|
||||
DATABASE["actors"] = ACTORS
|
||||
return ACTORS[uri]
|
||||
|
|
Loading…
Reference in a new issue