mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 14:59:29 -07:00
Fix AP implementation
This commit is contained in:
parent
e6a42f3274
commit
0dfe3d763d
1 changed files with 9 additions and 1 deletions
|
@ -55,6 +55,14 @@ router.get('/.well-known/webfinger', (req, res) => {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!req.query.resource) {
|
||||||
|
res.status(400).send();
|
||||||
|
return
|
||||||
|
} else if (req.query.resource != "acct:keyoxide@keyoxide.org") {
|
||||||
|
res.status(404).send();
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
subject: `acct:keyoxide@${process.env.DOMAIN}`,
|
subject: `acct:keyoxide@${process.env.DOMAIN}`,
|
||||||
aliases: [`https://${process.env.DOMAIN}/users/keyoxide`],
|
aliases: [`https://${process.env.DOMAIN}/users/keyoxide`],
|
||||||
|
@ -87,7 +95,7 @@ router.get('/users/keyoxide', (req, res) => {
|
||||||
id: `https://${process.env.DOMAIN}/users/keyoxide`,
|
id: `https://${process.env.DOMAIN}/users/keyoxide`,
|
||||||
type: 'Application',
|
type: 'Application',
|
||||||
inbox: `https://${process.env.DOMAIN}/users/keyoxide/inbox`,
|
inbox: `https://${process.env.DOMAIN}/users/keyoxide/inbox`,
|
||||||
preferredUsername: `${process.env.DOMAIN}`,
|
preferredUsername: 'keyoxide',
|
||||||
publicKey: {
|
publicKey: {
|
||||||
id: `https://${process.env.DOMAIN}/users/keyoxide#main-key`,
|
id: `https://${process.env.DOMAIN}/users/keyoxide#main-key`,
|
||||||
owner: `https://${process.env.DOMAIN}/users/keyoxide`,
|
owner: `https://${process.env.DOMAIN}/users/keyoxide`,
|
||||||
|
|
Loading…
Reference in a new issue