summaryrefslogtreecommitdiff
path: root/src/pages/.well-known
diff options
context:
space:
mode:
authorJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-07-06 15:45:22 -0300
committerJoão Augusto Costa Branco Marado Torres <torres.dev@disroot.org>2025-07-06 15:45:22 -0300
commita8c6eb9542e4baba3ce05da454fc52548214ba06 (patch)
tree4a2bac5ad88bc56fb24eab4ad398094341fc3810 /src/pages/.well-known
parent87df5a27cb34ada02f54dacf4299574f04038612 (diff)
feat: kind of integrate activity pub
Signed-off-by: João Augusto Costa Branco Marado Torres <torres.dev@disroot.org>
Diffstat (limited to 'src/pages/.well-known')
-rw-r--r--src/pages/.well-known/webfinger.ts22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/pages/.well-known/webfinger.ts b/src/pages/.well-known/webfinger.ts
new file mode 100644
index 0000000..5f5ca8e
--- /dev/null
+++ b/src/pages/.well-known/webfinger.ts
@@ -0,0 +1,22 @@
+import type { APIRoute } from "astro";
+import { env } from "../../lib/environment.ts";
+
+const { PUBLIC_SITE_URL } = env;
+const site = new URL(PUBLIC_SITE_URL);
+
+const webfinger = {
+ "subject": "acct:cravodeabril@cravodeabril.pt",
+ "links": [
+ {
+ "rel": "self",
+ "type": "application/activity+json",
+ "href": new URL("actor.json", site),
+ },
+ ],
+};
+
+export const GET: APIRoute = (): Response => {
+ return new Response(JSON.stringify(webfinger), {
+ headers: { "Content-Type": "application/json" },
+ });
+};