generated from nathanwoodburn/python-webserver-template
parent
06749d2c07
commit
c4b1be2149
@ -106,7 +106,7 @@ def catch_all(path: str):
|
||||
#region API routes
|
||||
@app.route("/api/v1/ssl/<domain>")
|
||||
def api_ssl(domain: str):
|
||||
regexmatch = re.match(r"^([a-z0-9]+(-[a-z0-9]+)*\.)*([a-z0-9]+(-[a-z0-9]+)*)$", domain)
|
||||
regexmatch = re.match(r"^([a-z0-9]+(-[a-z0-9]+)*\.)*([a-z0-9]+([-a-z0-9])*)$", domain)
|
||||
if not regexmatch:
|
||||
return api_error("Please provide a valid domain to check")
|
||||
result = tools.check_ssl(domain)
|
||||
|
@ -12,7 +12,7 @@ document.getElementById("domain").addEventListener("keyup", function (event) {
|
||||
|
||||
function getSSL() {
|
||||
// Get the input value
|
||||
const domain = document.getElementById("domain").value;
|
||||
const domain = document.getElementById("domain").value.trim().toLowerCase();
|
||||
// Set the domain parameter
|
||||
const params = new URLSearchParams();
|
||||
params.append("domain", domain);
|
||||
|
Loading…
Reference in New Issue
Block a user