forked from Mirrors/keyoxide-web
Add environment variable to set Onion-Location header
This commit is contained in:
parent
1758ee90f8
commit
afaa102ea3
2 changed files with 13 additions and 0 deletions
|
@ -36,6 +36,15 @@ md.use(require("markdown-it-anchor"));
|
|||
md.use(require("markdown-it-table-of-contents"), { "includeLevel": [2, 3], "listType": "ol" });
|
||||
md.use(require('markdown-it-title'));
|
||||
|
||||
|
||||
if(process.env.ONION_URL)
|
||||
{
|
||||
router.get('/*', (req, res, next) => {
|
||||
res.header('Onion-Location', process.env.ONION_URL);
|
||||
next();
|
||||
});
|
||||
}
|
||||
|
||||
router.get('/', (req, res) => {
|
||||
res.render('index')
|
||||
});
|
||||
|
|
|
@ -16,3 +16,7 @@
|
|||
# Expected format: "XXXXXXXXXXXXXXXXXXXXX"
|
||||
# If none is provided (default), Twitter accounts are not verified
|
||||
#TWITTER_API_AUTH=
|
||||
|
||||
# Tor Onion URL
|
||||
# The full http:// onion url to add as an 'Onion-Location' header
|
||||
#ONION_URL=
|
||||
|
|
Loading…
Reference in a new issue