forked from nostr/nostrweb
content: exlcude links to localhost
No good reason to link to localhost.
parent
dc664fc318
commit
d7f75f92e0
|
@ -31,6 +31,9 @@ function isValidURL(url) {
|
|||
if (!['', '443', '80'].includes(url.port)) {
|
||||
return false;
|
||||
}
|
||||
if (url.hostname === 'localhost') {
|
||||
return false;
|
||||
}
|
||||
const lastDot = url.hostname.lastIndexOf('.');
|
||||
if (lastDot < 1) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue