bluehalo / node-fhir-server-core

An Open Source secure REST implementation for the HL7 FHIR Specification. For API documentation, please see https://github.com/Asymmetrik/node-fhir-server-core/wiki.
https://asymmetrik.com/healthcare
MIT License
391 stars 120 forks source link

fix(ssl) : minor code change #211

Closed keerthivasan-r closed 4 years ago

keerthivasan-r commented 4 years ago

This PR fixes #208

keerthivasan-r commented 4 years ago

I think i didn't tell it clearly in the previous PR. It is not just about the checking of server.ssl in the boolean expression. The problem is the data that gets assigned back to the property. In the below script, the value of USE_HTTPS gets the value of server.ssl.cert instead of server.ssl. That creates the problem, when it is used by helmet config

this.env = { IS_PRODUCTION: !process.env.NODE_ENV || process.env.NODE_ENV === 'production', USE_HTTPS: server.ssl && server.ssl.key && server.ssl.cert, }; Hope you get my point now!