From 9af657e1fcad4b970074e77f687942793988a6fc Mon Sep 17 00:00:00 2001 From: Nik 'Fire Eater' Krimm Date: Mon, 11 Sep 2023 13:05:06 -0500 Subject: [PATCH] [#526] Add small test check for raised question. --- test/proxyReqOptDecorator.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/proxyReqOptDecorator.js b/test/proxyReqOptDecorator.js index a8b666e2..4f402b31 100644 --- a/test/proxyReqOptDecorator.js +++ b/test/proxyReqOptDecorator.js @@ -65,6 +65,7 @@ describe('proxyReqOptDecorator', function () { app.use(proxy('localhost:12345', { proxyReqOptDecorator: function (reqOpt, req) { reqOpt.headers['user-agent'] = 'test user agent'; + reqOpt.headers['content-type'] = 'multipart/form-data'; assert(req instanceof http.IncomingMessage); return reqOpt; } @@ -75,6 +76,7 @@ describe('proxyReqOptDecorator', function () { .end(function (err, res) { if (err) { return done(err); } assert.equal(res.body.headers['user-agent'], 'test user agent'); + assert.equal(res.body.headers['content-type'], 'multipart/form-data'); done(); }); });