get iterator in top level vs nested directories
@@ -38,6 +38,7 @@ async def get_certs(request):
key_valid_extensions = ('.key', '.pem')
certs_root_dir = _get_certs_dir('/etc/certs')
for root, dirs, files in os.walk(certs_root_dir):
+ if not root.endswith(("pem", "json")):
for f in files:
if f.endswith('.cert'):
certs.append(f)
