Support blacklist with port
This commit is contained in:
parent
938fe9f752
commit
1bd2bf1ae3
2 changed files with 9 additions and 2 deletions
|
@ -39,4 +39,11 @@ describe("shared/blacklist", () => {
|
|||
expect(includes(blacklist, 'https://github.com/abcdef')).to.be.true;
|
||||
expect(includes(blacklist, 'https://gist.github.com/abc')).to.be.false;
|
||||
})
|
||||
|
||||
it('matches address and port', () => {
|
||||
let blacklist = ['127.0.0.1:8888'];
|
||||
|
||||
expect(includes(blacklist, 'http://127.0.0.1:8888/')).to.be.true;
|
||||
expect(includes(blacklist, 'http://127.0.0.1:8888/hello')).to.be.true;
|
||||
})
|
||||
});
|
||||
|
|
Reference in a new issue