[backend/federation] Preload webfinger JSON-LD context definition
This commit is contained in:
parent
29cbf5cb4b
commit
1c2c958dfb
2 changed files with 17 additions and 6 deletions
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,12 +15,13 @@ public static class LdHelpers
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<string, RemoteDocument> PreloadedContexts = new()
|
private static readonly Dictionary<string, RemoteDocument> PreloadedContexts = new()
|
||||||
{
|
{
|
||||||
["https://www.w3.org/ns/activitystreams"] = GetPreloadedContext("as.json"),
|
["https://purl.archive.org/socialweb/webfinger"] = GetPreloadedContext("wf.json"),
|
||||||
["https://w3id.org/security/v1"] = GetPreloadedContext("security.json"),
|
["https://www.w3.org/ns/activitystreams"] = GetPreloadedContext("as.json"),
|
||||||
["http://joinmastodon.org/ns"] = GetPreloadedContext("toot.json"),
|
["https://w3id.org/security/v1"] = GetPreloadedContext("security.json"),
|
||||||
["https://gotosocial.org/ns"] = GetPreloadedContext("gts.json"),
|
["http://joinmastodon.org/ns"] = GetPreloadedContext("toot.json"),
|
||||||
["http://schema.org/"] = GetPreloadedContext("schema.json"),
|
["https://gotosocial.org/ns"] = GetPreloadedContext("gts.json"),
|
||||||
["litepub-0.1"] = GetPreloadedContext("litepub.json")
|
["http://schema.org/"] = GetPreloadedContext("schema.json"),
|
||||||
|
["litepub-0.1"] = GetPreloadedContext("litepub.json")
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly ConcurrentDictionary<string, RemoteDocument> ContextCache = new();
|
private static readonly ConcurrentDictionary<string, RemoteDocument> ContextCache = new();
|
||||||
|
|
Loading…
Add table
Reference in a new issue