1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-13 17:17:23 +01:00

merge functions get_web_domains and get_default_www_redirects

This commit is contained in:
Joshua Tauberer
2015-11-29 14:43:12 +00:00
parent be9efe0273
commit 808522d895
5 changed files with 44 additions and 49 deletions

View File

@@ -326,12 +326,12 @@ def ssl_get_csr(domain):
@app.route('/ssl/install', methods=['POST'])
@authorized_personnel_only
def ssl_install_cert():
from web_update import get_web_domains, get_default_www_redirects
from web_update import get_web_domains
from ssl_certificates import install_cert
domain = request.form.get('domain')
ssl_cert = request.form.get('cert')
ssl_chain = request.form.get('chain')
if domain not in get_web_domains(env) + get_default_www_redirects(env):
if domain not in get_web_domains(env):
return "Invalid domain name."
return install_cert(domain, ssl_cert, ssl_chain, env)