mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
draft "security.txt" spec integration (#1020)
This commit is contained in:
parent
35c2930776
commit
5447516b9a
5 changed files with 26 additions and 2 deletions
|
@ -79,6 +79,21 @@ staticRouter.get('/robots.txt',
|
|||
}
|
||||
)
|
||||
|
||||
// security.txt service
|
||||
staticRouter.get('/security.txt',
|
||||
(_, res: express.Response) => {
|
||||
return res.redirect(301, '/.well-known/security.txt')
|
||||
}
|
||||
)
|
||||
|
||||
staticRouter.get('/.well-known/security.txt',
|
||||
asyncMiddleware(cacheRoute(ROUTE_CACHE_LIFETIME.SECURITYTXT)),
|
||||
(_, res: express.Response) => {
|
||||
res.type('text/plain')
|
||||
return res.send(CONFIG.INSTANCE.SECURITYTXT + CONFIG.INSTANCE.SECURITYTXT_CONTACT)
|
||||
}
|
||||
)
|
||||
|
||||
// nodeinfo service
|
||||
staticRouter.use('/.well-known/nodeinfo',
|
||||
asyncMiddleware(cacheRoute(ROUTE_CACHE_LIFETIME.NODEINFO)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue