Skip to content

Commit

Permalink
Add options to request (#1777)
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman committed Apr 30, 2020
1 parent 1c75292 commit 950cbcd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/winston/transports/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 950cbcd

Please sign in to comment.