mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Using a single generic skipped regex for acme challenge in ssowat conf
This commit is contained in:
parent
c57e343d45
commit
dc731c3af5
1 changed files with 2 additions and 16 deletions
|
@ -1031,22 +1031,8 @@ def app_ssowatconf(auth):
|
|||
for domain in domains:
|
||||
skipped_urls.extend([domain + '/yunohost/admin', domain + '/yunohost/api'])
|
||||
|
||||
# Authorize ACME challenge url if a domain seems configured for it...
|
||||
for domain in domains:
|
||||
|
||||
# Check ACME challenge file is present in nginx conf
|
||||
nginx_acme_challenge_conf_file = "/etc/nginx/conf.d/%s.d/000-acmechallenge.conf" % domain
|
||||
|
||||
if not os.path.isfile(nginx_acme_challenge_conf_file):
|
||||
continue
|
||||
|
||||
# Check the file contains the ACME challenge uri
|
||||
if not '/.well-known/acme-challenge' in open(nginx_acme_challenge_conf_file).read():
|
||||
continue
|
||||
|
||||
# If so, then authorize the ACME challenge uri to unprotected regex
|
||||
unprotected_regex.append(domain + "/%.well%-known/acme%-challenge/.*$")
|
||||
|
||||
# Authorize ACME challenge url
|
||||
skipped_regex.append("^[^/]*/%.well%-known/acme%-challenge/.*$")
|
||||
|
||||
conf_dict = {
|
||||
'portal_domain': main_domain,
|
||||
|
|
Loading…
Add table
Reference in a new issue