Add important todo.

This commit is contained in:
Andrew Pietila 2024-08-01 02:22:02 -05:00
parent d6d8a86704
commit 1e66bbd85f

View file

@ -9,6 +9,7 @@ export const dynamic = 'force-dynamic';
export async function POST(request: NextRequest) {
// TODO: HTTP Signature Validation (middleware?)
const originBody = await request.json();
// TODO: Caching. We don't want to be buttholes to whoever provides the jsonld contexts other servers might return.
const jsonldBody = await jsonld.compact(originBody, ["https://www.w3.org/ns/activitystreams"]);
if ( jsonldBody.type === "Follow" ) {
for ( let toActor of jsonldBody.to ) {