mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-11-05 18:56:09 +08:00
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:
committed by
GitHub
parent
2b459b47ee
commit
0cefd5ddef
@@ -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', '']);
|
||||
|
||||
Reference in New Issue
Block a user