generated from nathanwoodburn/python-webserver-template
fix: Update regex to allow xn-- domains
All checks were successful
Build Docker / BuildImage (push) Successful in 30s
All checks were successful
Build Docker / BuildImage (push) Successful in 30s
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user