diff --git a/lib/winston/transports/http.js b/lib/winston/transports/http.js index 0856a6bf9..e4ede82c1 100644 --- a/lib/winston/transports/http.js +++ b/lib/winston/transports/http.js @@ -26,6 +26,7 @@ module.exports = class Http extends TransportStream { constructor(options = {}) { super(options); + this.options = options; this.name = options.name || 'http'; this.ssl = !!options.ssl; this.host = options.host || 'localhost'; @@ -182,6 +183,7 @@ module.exports = class Http extends TransportStream { headers['Authorization'] = `Bearer ${auth.bearer}`; } const req = (this.ssl ? https : http).request({ + ...this.options, method: 'POST', host: this.host, port: this.port,