content: exlcude links to localhost
ci/woodpecker/pr/woodpecker Pipeline was successful Details
ci/woodpecker/push/woodpecker Pipeline was successful Details

No good reason to link to localhost.
pull/53/head
OFF0 2 years ago
parent dc664fc318
commit d7f75f92e0
Signed by: offbyn
GPG Key ID: 94A2F643C51F37FA

@ -31,6 +31,9 @@ function isValidURL(url) {
if (!['', '443', '80'].includes(url.port)) { if (!['', '443', '80'].includes(url.port)) {
return false; return false;
} }
if (url.hostname === 'localhost') {
return false;
}
const lastDot = url.hostname.lastIndexOf('.'); const lastDot = url.hostname.lastIndexOf('.');
if (lastDot < 1) { if (lastDot < 1) {
return false; return false;

Loading…
Cancel
Save