mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Enable CORS for the webfinger endpoint
This commit is contained in:
parent
827ba5cd2d
commit
e16dbb4590
1 changed files with 5 additions and 2 deletions
|
@ -77,7 +77,6 @@ _RESIZED_CACHE: MutableMapping[tuple[str, int], tuple[bytes, str, Any]] = LFUCac
|
||||||
#
|
#
|
||||||
# Next:
|
# Next:
|
||||||
# - fix issue with followers from a blocked server (skip it?)
|
# - fix issue with followers from a blocked server (skip it?)
|
||||||
# - CORS webfinger endpoint
|
|
||||||
# - allow to share old notes
|
# - allow to share old notes
|
||||||
# - only show 10 most recent threads in DMs
|
# - only show 10 most recent threads in DMs
|
||||||
# - prevent double accept/double follow
|
# - prevent double accept/double follow
|
||||||
|
@ -824,7 +823,11 @@ async def wellknown_webfinger(resource: str) -> JSONResponse:
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
return JSONResponse(out, media_type="application/jrd+json; charset=utf-8")
|
return JSONResponse(
|
||||||
|
out,
|
||||||
|
media_type="application/jrd+json; charset=utf-8",
|
||||||
|
headers={"Access-Control-Allow-Origin": "*"},
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/.well-known/nodeinfo")
|
@app.get("/.well-known/nodeinfo")
|
||||||
|
|
Loading…
Reference in a new issue