Additional check to avoid trying to read binary file in some edge case

This commit is contained in:
Alexandre Aubin 2019-03-09 19:40:46 +01:00
parent fbcdf54cdf
commit f99f2ff5a1

View file

@ -144,7 +144,7 @@ class App():
#
for filename in os.listdir(self.path + "/conf"):
if not os.path.isfile(self.path + "/conf/" + filename):
if not os.path.isfile(self.path + "/conf/" + filename) or "nginx" not in filename:
continue
content = open(self.path + "/conf/" + filename).read()
if "location" in content and "add_header" in content: