mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Merge pull request 'Add environment variable to set Onion-Location header' (#28) from Supernova/fork-keyoxide:v2OnionLocation into dev
Reviewed-on: https://codeberg.org/keyoxide/web/pulls/28
This commit is contained in:
commit
30e880e4bb
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