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

wants to merge 1 commit into from


Copy link

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:

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'),
rejectUnauthorized: true

…onnection options (specifically for certificate configuration)
Copy link

Can you add pfx to that ?

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.

Copy link

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
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants