diff --git a/test/Validation.test.js b/test/Validation.test.js index 12c54d7e83..8dc0f98cb6 100644 --- a/test/Validation.test.js +++ b/test/Validation.test.js @@ -171,6 +171,19 @@ describe('Validation', () => { } }); + it('should allow urls with scheme for checking origin', () => { + const options = { + public: 'test.host:80' + }; + const headers = { + origin: 'https://test.host' + }; + const server = new Server(compiler, options); + if (!server.checkHost(headers, 'origin')) { + throw new Error("Validation didn't fail"); + } + }); + describe('allowedHosts', () => { it('should allow hosts in allowedHosts', () => { const tests = [