From a063280eab5e8749c74381aabbe641c30887e9f6 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 2 Sep 2016 12:35:09 -0700 Subject: [bugfix] static sites: only enable hidden service by default if one domain is configured The problem is that we have a single onion address per server, so if more than one domain is configured we need to make sure they don't both try to use the same onion address. --- puppet/modules/site_static/manifests/init.pp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'puppet/modules/site_static/manifests/init.pp') diff --git a/puppet/modules/site_static/manifests/init.pp b/puppet/modules/site_static/manifests/init.pp index 824619b4..dd3f912d 100644 --- a/puppet/modules/site_static/manifests/init.pp +++ b/puppet/modules/site_static/manifests/init.pp @@ -77,6 +77,14 @@ class site_static { if $hidden_service['active'] { include site_static::hidden_service } + # Currently, we only support a single hidden service address per server. + # So if there is more than one domain configured, then we need to make sure + # we don't enable the hidden service for every domain. + if size(keys($domains)) == 1 { + $always_use_hidden_service = true + } else { + $always_use_hidden_service = false + } } create_resources(site_static::domain, $domains) -- cgit v1.2.3