aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'url.c')
-rw-r--r--url.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/url.c b/url.c
index 55a794d..0c0b709 100644
--- a/url.c
+++ b/url.c
@@ -1696,6 +1696,10 @@ openURL(char *url, ParsedURL *pu, ParsedURL *current,
}
}
+ if (LocalhostOnly && pu->host &&
+ strcasecmp(pu->host, "localhost") && strcasecmp(pu->host, "127.0.0.1"))
+ pu->host = NULL;
+
uf.scheme = pu->scheme;
uf.url = parsedURL2Str(pu)->ptr;
pu->is_nocache = (option->flag & RG_NOCACHE);