Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

winston.transports.Http - How to add (Authorization) header #1020

Closed
Redsandro opened this issue May 9, 2017 · 1 comment
Closed

winston.transports.Http - How to add (Authorization) header #1020

Redsandro opened this issue May 9, 2017 · 1 comment
Labels
Feature Request Request for new functionality to support use cases not already covered

Comments

@Redsandro
Copy link
Contributor

Redsandro commented May 9, 2017

We need to set oAuth header in stead of username:password. Is this possible?

According to this, they seem to be hardcoded. And auth is hardcoded as user:pass.

 req = (this.ssl ? https : http).request({
    host: this.host,
    port: this.port,
    path: '/' + path.replace(/^\//, ''),
    method: 'POST',
    headers: { 'Content-Type': 'application/json' }, // <------ here, no options to override
    agent: this.agent,
    auth: (auth) ? auth.username + ':' + auth.password : ''
  });
@indexzero indexzero added the Feature Request Request for new functionality to support use cases not already covered label Jan 29, 2019
@DABH
Copy link
Contributor

DABH commented Aug 15, 2019

#1662 may help as well [#1021 was already cherry picked to master]

@DABH DABH closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Request for new functionality to support use cases not already covered
Projects
None yet
Development

No branches or pull requests

3 participants