Change ENV variable

This commit is contained in:
Yarmo Mackenbach 2022-10-27 22:21:22 +02:00
parent 0660981fb8
commit 613f7b33f1
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1

View file

@ -58,7 +58,7 @@ router.get('/privacy', (req, res) => {
}) })
router.get('/.well-known/webfinger', (req, res) => { router.get('/.well-known/webfinger', (req, res) => {
if (!(process.env.DOMAIN && process.env.ACTIVITYPUB_PUBLICKEY)) { if (!(process.env.DOMAIN && process.env.ACTIVITYPUB_PUBLIC_KEY)) {
res.status(404).send('<body><pre>Cannot GET /.well-known/webfinger</pre></body>') res.status(404).send('<body><pre>Cannot GET /.well-known/webfinger</pre></body>')
return return
} }
@ -76,7 +76,7 @@ router.get('/.well-known/webfinger', (req, res) => {
}) })
router.get('/users/keyoxide', (req, res) => { router.get('/users/keyoxide', (req, res) => {
if (!(process.env.DOMAIN && process.env.ACTIVITYPUB_PUBLICKEY)) { if (!(process.env.DOMAIN && process.env.ACTIVITYPUB_PUBLIC_KEY)) {
res.status(404).send('<body><pre>Cannot GET /keyoxide</pre></body>') res.status(404).send('<body><pre>Cannot GET /keyoxide</pre></body>')
return return
} }
@ -93,7 +93,7 @@ router.get('/users/keyoxide', (req, res) => {
'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`,
'publicKeyPem': `${process.env.ACTIVITYPUB_PUBLICKEY}` 'publicKeyPem': `${process.env.ACTIVITYPUB_PUBLIC_KEY}`
} }
} }
res.type('application/activity+json').json(body) res.type('application/activity+json').json(body)