add variable for hsts

This commit is contained in:
VirtuBox
2019-04-15 16:00:26 +02:00
parent 992e4f9aaa
commit cf97f18a15
2 changed files with 12 additions and 6 deletions

View File

@@ -1453,13 +1453,13 @@ def renewLetsEncrypt(self, wo_domain_name):
# redirect= False to disable https redirection
def setupHsts(self, wo_domain, hsts=True):
def setupHsts(self, wo_domain_name):
Log.info(
self, "Adding /var/www/{0}/conf/nginx/hsts.conf"
.format(wo_domain))
.format(wo_domain_name))
hstsconf = open("/var/www/{0}/conf/nginx/hsts.conf"
.format(wo_domain),
.format(wo_domain_name),
encoding='utf-8', mode='w')
hstsconf.write("more_set_headers "
"\"Strict-Transport-Security: "