diff options
author | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-07 14:30:24 +0100 |
---|---|---|
committer | Raphael Kabo <raphaelkabo@hey.com> | 2023-10-07 15:38:47 +0100 |
commit | b795d07ed7a1b705b72b171f8e8de267a720223b (patch) | |
tree | b8ae3df8dbb89f839f29328e817f030dc22b89f8 /src/lib/activitypub.ts | |
parent | 9341659fd7a791d77454dd33743e42d952dbd202 (diff) |
refactor: event form and api routes
Diffstat (limited to 'src/lib/activitypub.ts')
-rw-r--r-- | src/lib/activitypub.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/activitypub.ts b/src/lib/activitypub.ts new file mode 100644 index 0000000..0a3db7b --- /dev/null +++ b/src/lib/activitypub.ts @@ -0,0 +1,9 @@ +import { Request } from "express"; + +export const acceptsActivityPub = (req: Request) => { + return ( + req.headers.accept && + (req.headers.accept.includes("application/activity+json") || + req.headers.accept.includes("application/ld+json")) + ); +}; |