mirror of
https://github.com/msfjarvis/msfjarvis.dev.git
synced 2024-06-03 04:18:56 +05:30
feat(netlify): add an edge function for WebFinger
This commit is contained in:
parent
e8f357a125
commit
1b8466c0b4
|
@ -8,3 +8,8 @@
|
||||||
[[edge_functions]]
|
[[edge_functions]]
|
||||||
path = "/*"
|
path = "/*"
|
||||||
function = "root"
|
function = "root"
|
||||||
|
|
||||||
|
|
||||||
|
[[edge_functions]]
|
||||||
|
function = "webfinger"
|
||||||
|
path = "/.well-known/webfinger"
|
||||||
|
|
28
netlify/edge-functions/webfinger/webfinger.ts
Executable file
28
netlify/edge-functions/webfinger/webfinger.ts
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
import type { Context } from "https://edge.netlify.com";
|
||||||
|
|
||||||
|
export default async (request: Request, context: Context) => {
|
||||||
|
context.log(request.url);
|
||||||
|
return context.json({
|
||||||
|
subject: "acct:msfjarvis@androiddev.social",
|
||||||
|
aliases: [
|
||||||
|
"https://androiddev.social/@msfjarvis",
|
||||||
|
"https://androiddev.social/users/msfjarvis",
|
||||||
|
],
|
||||||
|
links: [
|
||||||
|
{
|
||||||
|
rel: "http://webfinger.net/rel/profile-page",
|
||||||
|
type: "text/html",
|
||||||
|
href: "https://androiddev.social/@msfjarvis",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
rel: "self",
|
||||||
|
type: "application/activity+json",
|
||||||
|
href: "https://androiddev.social/users/msfjarvis",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
rel: "http://ostatus.org/schema/1.0/subscribe",
|
||||||
|
template: "https://androiddev.social/authorize_interaction?uri={uri}",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user