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

Added http/https config options for advanced request settings #53

Closed
wants to merge 1 commit into from

Conversation

ralflizard
Copy link
Contributor

Added an options object to the eventSourceInitDict object to setup http/https connection settings.

For my specific use case, it was to add a client certificate configuration for authentication with the Server.

https connection required:

options:{
key: fs.readFileSync(__dirname + '/client_certs/client_key.pem'),
cert: fs.readFileSync(__dirname + '/client_certs/client_cert.crt'),
ca: fs.readFileSync(__dirname + '/client_certs/cacert.crt'),
passphrase:'test1234$',
rejectUnauthorized: true
}

…onnection options (specifically for certificate configuration)
@gjuchault
Copy link

Can you add pfx to that ?

@ralflizard
Copy link
Contributor Author

yes you should be able to define it as an option in the configuration. options object will pass all options to the http/https request.

@rexxars
Copy link
Member

rexxars commented Apr 17, 2017

Thanks for this! I've merged it into master at 505628e, but did some changes:

Only HTTPS options are allowed through (whitelisted), and as such I've renamed the options object to https. I'd rather not see people depend on other type of changes that might make it harder to keep this library in line with the specification.

Thanks again. Will release a new version soon.

@rexxars rexxars closed this Apr 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants