Move lowercase

This commit is contained in:
bingus_violet 2024-07-13 06:14:13 -05:00
parent 3efadc6797
commit a8a57c0004

View file

@ -23,7 +23,7 @@ app.get("/makeURL", (req, res) => {
var config = fileHandler.config
writep("HTML Loaded.")
var url = req.query.url.toLowerCase()
var url = req.query.url
if (!url.includes("http://") && !url.includes("https://")) {
writep("Error: URL is missing protocol! Please include http:// or https:// in the URL for it to be valid.")
@ -37,7 +37,7 @@ app.get("/makeURL", (req, res) => {
}
domain = domain.substring(0, domain.indexOf("/"))
domain = domain.substring(domain.lastIndexOf(".", domain.lastIndexOf(".") - 1) + 1)
domain = domain.substring(domain.lastIndexOf(".", domain.lastIndexOf(".") - 1) + 1).toLowerCase()
writep("Input URL: " + url)