mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[test] show that we support protocol without the colon
This commit is contained in:
parent
c04485671a
commit
89f9ca1e89
@ -185,6 +185,18 @@ describe('lib/http-proxy/common.js', function () {
|
||||
expect(outgoing.path).to.eql('some-path/am');
|
||||
});
|
||||
|
||||
it('should properly detect https/wss protocol without the colon', function () {
|
||||
var outgoing = {};
|
||||
common.setupOutgoing(outgoing, {
|
||||
target: {
|
||||
protocol: 'https',
|
||||
host: 'whatever.com'
|
||||
}
|
||||
}, { url: '/' });
|
||||
|
||||
expect(outgoing.port).to.eql(443);
|
||||
});
|
||||
|
||||
it('should not prepend the target path to the outgoing path with prependPath = false', function () {
|
||||
var outgoing = {};
|
||||
common.setupOutgoing(outgoing, {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user