aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahielkasim@gmail.com>2016-11-07 10:58:15 +0100
committerRahiel Kasim <rahielkasim@gmail.com>2016-11-07 10:58:15 +0100
commit1dfa30b6ffc2b2c2355771e5c15c6a8d9975d2e6 (patch)
treee03bca50898f9a029a5d65a9eb8b87f7cbb27e4c
parent862a87e8d2a6fb49ad1ada13a3dbf8f74d901ae9 (diff)
add localhost to online archiving blacklist
-rw-r--r--utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils.js b/utils.js
index 17289bc..fb0f917 100644
--- a/utils.js
+++ b/utils.js
@@ -2,11 +2,11 @@
export const services = ["archive.is", "archive.org", "webcitation.org"];
-const exclude = ["file://", "about:", "chrome://"];
+const blacklist = ["file://", "about:", "chrome://", "http://127.0.0.1", "http://localhost"];
export function is_local(url) {
- for (let i = 0; i < exclude.length; i++) {
- if (url.startsWith(exclude[i]))
+ for (let b of blacklist) {
+ if (url.startsWith(b))
return true;
}
return false;