Merge branch 'bugfix/local-jsonld-context' into 'develop'
Host LitePub JSON-LD context locally See merge request pleroma/pleroma!435
This commit is contained in:
commit
7daa102fa4
|
@ -72,7 +72,7 @@ def make_json_ld_header do
|
||||||
%{
|
%{
|
||||||
"@context" => [
|
"@context" => [
|
||||||
"https://www.w3.org/ns/activitystreams",
|
"https://www.w3.org/ns/activitystreams",
|
||||||
"https://litepub.github.io/litepub/context.jsonld"
|
"#{Web.base_url()}/schemas/litepub-0.1.jsonld"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,13 +11,16 @@ defmodule Pleroma.Web.Endpoint do
|
||||||
#
|
#
|
||||||
# You should set gzip to true if you are running phoenix.digest
|
# You should set gzip to true if you are running phoenix.digest
|
||||||
# when deploying your static files in production.
|
# when deploying your static files in production.
|
||||||
|
plug(CORSPlug)
|
||||||
|
|
||||||
plug(Plug.Static, at: "/media", from: Pleroma.Uploaders.Local.upload_path(), gzip: false)
|
plug(Plug.Static, at: "/media", from: Pleroma.Uploaders.Local.upload_path(), gzip: false)
|
||||||
|
|
||||||
plug(
|
plug(
|
||||||
Plug.Static,
|
Plug.Static,
|
||||||
at: "/",
|
at: "/",
|
||||||
from: :pleroma,
|
from: :pleroma,
|
||||||
only: ~w(index.html static finmoji emoji packs sounds images instance sw.js favicon.png)
|
only:
|
||||||
|
~w(index.html static finmoji emoji packs sounds images instance sw.js favicon.png schemas)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Code reloading can be explicitly enabled under the
|
# Code reloading can be explicitly enabled under the
|
||||||
|
@ -56,7 +59,6 @@ defmodule Pleroma.Web.Endpoint do
|
||||||
extra: "SameSite=Strict"
|
extra: "SameSite=Strict"
|
||||||
)
|
)
|
||||||
|
|
||||||
plug(CORSPlug)
|
|
||||||
plug(Pleroma.Web.Router)
|
plug(Pleroma.Web.Router)
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
|
23
priv/static/schemas/litepub-0.1.jsonld
Normal file
23
priv/static/schemas/litepub-0.1.jsonld
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"@context": [
|
||||||
|
"https://www.w3.org/ns/activitystreams",
|
||||||
|
"https://w3id.org/security/v1",
|
||||||
|
{
|
||||||
|
"Emoji": "toot:Emoji",
|
||||||
|
"Hashtag": "as:Hashtag",
|
||||||
|
"PropertyValue": "schema:PropertyValue",
|
||||||
|
"atomUri": "ostatus:atomUri",
|
||||||
|
"conversation": {
|
||||||
|
"@id": "ostatus:conversation",
|
||||||
|
"@type": "@id"
|
||||||
|
},
|
||||||
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
||||||
|
"ostatus": "http://ostatus.org#",
|
||||||
|
"schema": "http://schema.org",
|
||||||
|
"toot": "http://joinmastodon.org/ns#",
|
||||||
|
"totalItems": "as:totalItems",
|
||||||
|
"value": "schema:value",
|
||||||
|
"sensitive": "as:sensitive"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in a new issue