aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/pleroma/web/activity_pub/utils.ex2
-rw-r--r--lib/pleroma/web/endpoint.ex6
-rw-r--r--priv/static/schemas/litepub-0.1.jsonld23
3 files changed, 28 insertions, 3 deletions
diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex
index fac91830a..549148989 100644
--- a/lib/pleroma/web/activity_pub/utils.ex
+++ b/lib/pleroma/web/activity_pub/utils.ex
@@ -72,7 +72,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do
%{
"@context" => [
"https://www.w3.org/ns/activitystreams",
- "https://litepub.github.io/litepub/context.jsonld"
+ "#{Web.base_url()}/schemas/litepub-0.1.jsonld"
]
}
end
diff --git a/lib/pleroma/web/endpoint.ex b/lib/pleroma/web/endpoint.ex
index 6673ab576..cb5de087b 100644
--- a/lib/pleroma/web/endpoint.ex
+++ b/lib/pleroma/web/endpoint.ex
@@ -11,13 +11,16 @@ defmodule Pleroma.Web.Endpoint do
#
# You should set gzip to true if you are running phoenix.digest
# 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: "/",
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
@@ -56,7 +59,6 @@ defmodule Pleroma.Web.Endpoint do
extra: "SameSite=Strict"
)
- plug(CORSPlug)
plug(Pleroma.Web.Router)
@doc """
diff --git a/priv/static/schemas/litepub-0.1.jsonld b/priv/static/schemas/litepub-0.1.jsonld
new file mode 100644
index 000000000..819d25c38
--- /dev/null
+++ b/priv/static/schemas/litepub-0.1.jsonld
@@ -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"
+ }
+ ]
+}