Fix HSTS and update changelog
This commit is contained in:
@@ -1534,7 +1534,7 @@ def setupHsts(self, wo_domain_name):
|
||||
hstsconf.write("more_set_headers "
|
||||
"\"Strict-Transport-Security: "
|
||||
"max-age=31536000; "
|
||||
"'includeSubDomains; "
|
||||
"includeSubDomains; "
|
||||
"preload\";")
|
||||
hstsconf.close()
|
||||
return 0
|
||||
|
||||
@@ -397,12 +397,12 @@ class WOStackController(CementBaseController):
|
||||
Log.debug(self, "Calling pre_pref")
|
||||
pre_pref(self, apt_packages)
|
||||
if (apt_packages):
|
||||
meminfo = (os.popen('/bin/cat /proc/meminfo '
|
||||
'| grep MemTotal').read()).split(":")
|
||||
memsplit = re.split(" kB", meminfo[1])
|
||||
wo_mem = int(memsplit[0])
|
||||
if (wo_mem < 4000000):
|
||||
WOSwap.add(self)
|
||||
# meminfo = (os.popen('/bin/cat /proc/meminfo '
|
||||
# '| grep MemTotal').read()).split(":")
|
||||
# memsplit = re.split(" kB", meminfo[1])
|
||||
# wo_mem = int(memsplit[0])
|
||||
# if (wo_mem < 4000000):
|
||||
# WOSwap.add(self)
|
||||
Log.info(self, "Updating apt-cache, please wait...")
|
||||
WOAptGet.update(self)
|
||||
Log.info(self, "Installing packages, please wait...")
|
||||
|
||||
@@ -198,10 +198,10 @@ def post_pref(self, apt_packages, packages):
|
||||
(data), 'gzip.mustache', out=wo_nginx)
|
||||
wo_nginx.close()
|
||||
|
||||
if not os.path.isfile('/etc/nginx/conf.d/brotli.conf'):
|
||||
if not os.path.isfile('/etc/nginx/conf.d/brotli.conf.disabled'):
|
||||
Log.debug(self, 'Writting the nginx configuration to '
|
||||
'file /etc/nginx/conf.d/brotli.conf')
|
||||
wo_nginx = open('/etc/nginx/conf.d/brotli.conf',
|
||||
'file /etc/nginx/conf.d/brotli.conf.disabled')
|
||||
wo_nginx = open('/etc/nginx/conf.d/brotli.conf.disabled',
|
||||
encoding='utf-8', mode='w')
|
||||
self.app.render(
|
||||
(data), 'brotli.mustache', out=wo_nginx)
|
||||
|
||||
Reference in New Issue
Block a user