added cors headers
All checks were successful
ci / docker (push) Successful in 25s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s

This commit is contained in:
Nathan Windisch 2025-03-20 07:26:21 +00:00
parent 1b045a4540
commit 8f804a6905

View File

@ -50,5 +50,5 @@ def read_root(
root = xml.fromstring(response.text)
content = [i.text for i in root[1][0][0][3]] # root/body/GetFederationInformationResponseMessage/Domains
return JSONResponse(content=content, headers={"Cache-Control": "max-age=604800, public"})
return JSONResponse(content=content, headers={"Access-Control-Allow-Origin": "*", "Cache-Control": "max-age=604800, public"})