main: Add code block for tlsa info
All checks were successful
Build Docker / Build Bot (push) Successful in 21s
Build Docker / Build Master (push) Successful in 25s

This commit is contained in:
Nathan Woodburn 2023-09-20 22:21:00 +10:00
parent bda99dbf5f
commit c9f8a8237d
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 3 additions and 3 deletions

View File

@ -554,7 +554,7 @@ def success():
if "tlsa" in json:
tlsa = json['tlsa']
return render_template('success.html', title="Your site is ready!",message="Success<br>Domain: " + domain + "<br>IP: " + publicIP + "<br>TLSA: " + tlsa + "<br>Make sure to add the TLSA record to `_443._tcp." + domain + "` or `*." + domain + "`")
return render_template('success.html', title="Your site is ready!",message="Success<br>Domain: " + domain + "<br>IP: " + publicIP + "<br>TLSA: " + tlsa + "<br>Make sure to add the TLSA record to <code>_443._tcp." + domain + "</code> or <code>*." + domain + "</code>")
else:
return render_template('success.html', title="Your site is installing.<br>Please wait...",message="Domain: " + domain + "<br>IP: " + publicIP + "<br>TLSA: Pending<br>No TLSA record found")

View File

@ -44,8 +44,8 @@ def tlsa():
tlsa_file = open('wordpress-'+domain+'/tlsa.txt', 'r')
tlsa = tlsa_file.readlines()
tlsa_file.close()
except FileNotFoundError:
return jsonify({'error': 'TLSA record not found', 'success': 'false'})
except FileNotFoundError as e:
return jsonify({'error': 'TLSA record not found', 'success': 'false', 'ex': str(e)})
# Remove newlines
tlsa = tlsa[0].strip('\n')