Compare commits

..

No commits in common. "1b51bafee16f261ca1d7fd7fc2694fb1ddb54268" and "9803161404397c7c69f9316e0b7748251ec18379" have entirely different histories.

5 changed files with 13 additions and 26 deletions

View File

@ -11,13 +11,13 @@ export default async function (req: VercelRequest, res: VercelResponse) {
res.status(200).setHeader("Content-Type", "application/activity+json").json({ res.status(200).setHeader("Content-Type", "application/activity+json").json({
"@context": ["https://www.w3.org/ns/activitystreams", { "@language": "en-US" }], "@context": ["https://www.w3.org/ns/activitystreams", { "@language": "en-US" }],
"type": "Person", "type": "Person",
"id": "https://coderrrrr.site/blog", "id": "https://coderrrrr.site/coder",
"outbox": "https://coderrrrr.site/api/activitypub/outbox", "outbox": "https://coderrrrr.site/api/activitypub/outbox",
"following": "https://coderrrrr.site/api/activitypub/following", "following": "https://coderrrrr.site/api/activitypub/following",
"followers": "https://coderrrrr.site/api/activitypub/followers", "followers": "https://coderrrrr.site/api/activitypub/followers",
"sharedInbox": "https://coderrrrr.site/api/activitypub/sharedInbox", "sharedInbox": "https://coderrrrr.site/api/activitypub/sharedInbox",
"inbox": "https://coderrrrr.site/api/activitypub/inbox", "inbox": "https://coderrrrr.site/api/activitypub/inbox",
"preferredUsername": "blog", "preferredUsername": "coder",
"name": "Deva Midhun's blog", "name": "Deva Midhun's blog",
"discoverable": true, "discoverable": true,
"indexable": true, "indexable": true,
@ -50,8 +50,8 @@ export default async function (req: VercelRequest, res: VercelResponse) {
"publicKey": { "publicKey": {
"@context": "https://w3id.org/security/v1", "@context": "https://w3id.org/security/v1",
"@type": "Key", "@type": "Key",
"id": "https://coderrrrr.site/blog#main-key", "id": "https://coderrrrr.site/coder#main-key",
"owner": "https://coderrrrr.site/blog", "owner": "https://coderrrrr.site/coder",
"publicKeyPem": process.env.ACTIVITYPUB_PUBLIC_KEY || "MISSING_PUBLIC_KEY" "publicKeyPem": process.env.ACTIVITYPUB_PUBLIC_KEY || "MISSING_PUBLIC_KEY"
} }
}); });

View File

@ -1,7 +0,0 @@
import type { VercelRequest, VercelResponse } from "@vercel/node";
export default function (req: VercelRequest, res: VercelResponse) {
res.status(410).json({
error: "This account no longer exists."
});
};

View File

@ -5,21 +5,21 @@ export default function (req: VercelRequest, res: VercelResponse) {
res.statusCode = 200; res.statusCode = 200;
res.setHeader("Content-Type", `application/jrd+json`); res.setHeader("Content-Type", `application/jrd+json`);
res.end(`{ res.end(`{
"subject": "acct:blog@coderrrrr.site", "subject": "acct:coder@coderrrrr.site",
"aliases": [ "aliases": [
"https://coderrrrr.site/blog", "https://coderrrrr.site/coder",
"https://coderrrrr.site/@blog" "https://coderrrrr.site/@coder"
], ],
"links": [ "links": [
{ {
"rel": "http://webfinger.net/rel/profile-page", "rel": "http://webfinger.net/rel/profile-page",
"type": "text/html", "type": "text/html",
"href": "https://coderrrrr.site/blog" "href": "https://coderrrrr.site/coder"
}, },
{ {
"rel": "self", "rel": "self",
"type": "application/activity+json", "type": "application/activity+json",
"href": "https://coderrrrr.site/blog" "href": "https://coderrrrr.site/coder"
}, },
{ {
"rel": "http://ostatus.org/schema/1.0/subscribe", "rel": "http://ostatus.org/schema/1.0/subscribe",

View File

@ -1,4 +1,4 @@
function verifySignature(signature, publicKeyJson) { function verifySignature(signature:any, publicKeyJson:any) {
let signatureValid; let signatureValid;
try { try {
@ -12,5 +12,3 @@ function verifySignature(signature, publicKeyJson) {
return signatureValid; return signatureValid;
} }
module.exports = { verifySignature };

View File

@ -1,12 +1,12 @@
{ {
"functions": { "functions": {
"api/**/*": { "api/**/*": {
"maxDuration": 60 "maxDuration": 240
} }
}, },
"crons": [{ "crons": [{
"path": "/api/activitypub/sendNote.ts", "path": "/api/activitypub/sendNote.ts",
"schedule": "0 0 * * *" "schedule": "0 * * * *"
}], }],
"redirects": [ "redirects": [
{ {
@ -31,13 +31,9 @@
"source": "/authorize_interaction", "source": "/authorize_interaction",
"destination": "/api/activitypub/authorize_interaction.ts" "destination": "/api/activitypub/authorize_interaction.ts"
}, },
{
"source": "/blog",
"destination": "/api/activitypub/actor.ts"
},
{ {
"source": "/coder", "source": "/coder",
"destination": "/api/activitypub/old.ts" "destination": "/api/activitypub/actor.ts"
}, },
{ {
"source": "/followers", "source": "/followers",