diff --git a/CHANGELOG.md b/CHANGELOG.md index b54c681..5b87f9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added - h-card markup to profile pages (thanks to [caesar](https://codeberg.org/caesar) [PR#130](https://codeberg.org/keyoxide/keyoxide-web/pulls/130)) +- `ariadne-identity-proof` header to profile pages ### Fixed - Keybase profiles (thanks to [gonz0](https://codeberg.org/gonz0)) diff --git a/routes/profile.js b/routes/profile.js index 67cd5d3..efc6393 100644 --- a/routes/profile.js +++ b/routes/profile.js @@ -41,30 +41,35 @@ router.get('/sig', (req, res) => { router.post('/sig', bodyParser, async (req, res) => { const data = await generateSignatureProfile(req.body.signature) const title = utils.generatePageTitle('profile', data) + res.set('ariadne-identity-proof', data.keyData.openpgp4fpr) res.render('profile', { title: title, data: data, isSignature: true, signature: req.body.signature }) }) router.get('/wkd/:id', async (req, res) => { const data = await generateWKDProfile(req.params.id) const title = utils.generatePageTitle('profile', data) + res.set('ariadne-identity-proof', data.keyData.openpgp4fpr) res.render('profile', { title: title, data: data }) }) router.get('/hkp/:id', async (req, res) => { const data = await generateHKPProfile(req.params.id) const title = utils.generatePageTitle('profile', data) + res.set('ariadne-identity-proof', data.keyData.openpgp4fpr) res.render('profile', { title: title, data: data }) }) router.get('/hkp/:server/:id', async (req, res) => { const data = await generateHKPProfile(req.params.id, req.params.server) const title = utils.generatePageTitle('profile', data) + res.set('ariadne-identity-proof', data.keyData.openpgp4fpr) res.render('profile', { title: title, data: data }) }) router.get('/keybase/:username/:fingerprint', async (req, res) => { const data = await generateKeybaseProfile(req.params.username, req.params.fingerprint) const title = utils.generatePageTitle('profile', data) + res.set('ariadne-identity-proof', data.keyData.openpgp4fpr) res.render('profile', { title: title, data: data }) }) @@ -76,6 +81,7 @@ router.get('/:id', async (req, res) => { data = await generateHKPProfile(req.params.id) } const title = utils.generatePageTitle('profile', data) + res.set('ariadne-identity-proof', data.keyData.openpgp4fpr) res.render('profile', { title: title, data: data }) })