[backend/federation] Preload webfinger JSON-LD context definition

This commit is contained in:
Laura Hausmann 2024-10-24 19:27:04 +02:00
parent 29cbf5cb4b
commit 1c2c958dfb
No known key found for this signature in database
GPG key ID: D044E84C5BE01605
2 changed files with 17 additions and 6 deletions

View file

@ -0,0 +1,10 @@
{
"@context": {
"wf": "https://purl.archive.org/socialweb/webfinger#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"webfinger": {
"@id": "wf:webfinger",
"@type": "xsd:string"
}
}
}

View file

@ -15,6 +15,7 @@ public static class LdHelpers
{ {
private static readonly Dictionary<string, RemoteDocument> PreloadedContexts = new() private static readonly Dictionary<string, RemoteDocument> PreloadedContexts = new()
{ {
["https://purl.archive.org/socialweb/webfinger"] = GetPreloadedContext("wf.json"),
["https://www.w3.org/ns/activitystreams"] = GetPreloadedContext("as.json"), ["https://www.w3.org/ns/activitystreams"] = GetPreloadedContext("as.json"),
["https://w3id.org/security/v1"] = GetPreloadedContext("security.json"), ["https://w3id.org/security/v1"] = GetPreloadedContext("security.json"),
["http://joinmastodon.org/ns"] = GetPreloadedContext("toot.json"), ["http://joinmastodon.org/ns"] = GetPreloadedContext("toot.json"),