Add onion location support (#207)

* Add initial onion tab

* Add some explaining copy

* Add to generator

* Add strings to language packs

* Add external learn more link
This commit is contained in:
Matt (IPv4) Cowley
2021-01-04 15:41:56 +00:00
committed by GitHub
parent 2b459b47ee
commit 0cefd5ddef
12 changed files with 289 additions and 4 deletions

View File

@@ -150,6 +150,12 @@ export default (domain, domains, global) => {
// HTTPS
serverConfig.push(...sslConfig(domain, global));
// Onion location
if (domain.onion.onionLocation.computed) {
serverConfig.push(['# Onion services', '']);
serverConfig.push(['add_header Onion-Location', `http://${domain.onion.onionLocation.computed}$request_uri`]);
}
// HSTS
if (!commonHsts(domains) && domain.https.hsts.computed) {
serverConfig.push(['# HSTS', '']);