From 17a3df7440781c2c1e79a90579ff29ebde8f8e51 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Sat, 17 Apr 2021 17:42:01 +0900 Subject: New option localhost_only to restrict connections only to localhost Bug-Debian: https://github.com/tats/w3m/issues/117 --- url.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'url.c') 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); -- cgit v1.2.3