Skip to content

Commit

Permalink
fix: support for urls without protocol (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhudaDad414 authored Mar 24, 2021
1 parent 95c56e5 commit b67e10d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions filters/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ function port(url, defaultPort) {
filter.port = port;

function stripProtocol(url) {
if(!url.includes('://')){
return url;
}
const u = new URL(url);
return url.substr(u.protocol.length + 2);
}
Expand Down

0 comments on commit b67e10d

Please sign in to comment.