We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd6f037 commit d33f890Copy full SHA for d33f890
test/cli_spec.js
@@ -193,4 +193,29 @@ describe("CLI Tests", function() {
193
});
194
195
196
+
197
+ it("custom-header", function(done) {
198
+ var args = [
199
+ '--ip', '127.0.0.1',
200
+ '--ssl-cert', 'test/server.crt',
201
+ '--ssl-key', 'test/server.key',
202
+ '--port', port,
203
+ '--default-target', testUrl,
204
+ '--custom-header', 'k1: v1',
205
+ '--custom-header', ' k2 : v2 v2 ',
206
+ ];
207
+ executeCLI(execCmd, args).then((cliProcess) => {
208
+ childProcess = cliProcess;
209
+ r(SSLproxyUrl).then(body => {
210
+ body = JSON.parse(body);
211
+ expect(body.headers).toEqual(
212
+ jasmine.objectContaining({
213
+ k1: "v1",
214
+ k2: "v2 v2",
215
+ })
216
+ );
217
+ done();
218
+ });
219
220
221
0 commit comments