fedify icon indicating copy to clipboard operation
fedify copied to clipboard

Recognize JSON-LD context provided in a HTTP `Link` header

Open dahlia opened this issue 1 year ago • 0 comments

Currently, fetchDocumentLoader() simply ignores a Link header and always returns a RemoteDocument with contextUrl: null:

https://github.com/dahlia/fedify/blob/2a4aee5079c2da9a21bc3a4a40a13af0142bd5fc/runtime/docloader.ts#L62

However, the JSON-LD specification, section 4.9, Interpreting JSON as JSON-LD describes a method for attaching a JSON context to a plain JSON object via an HTTP Link header. We need to implement this specification.

dahlia avatar Mar 10 '24 04:03 dahlia