Skip to content

Comments

Feature/ni 161 - Meteoalarm message post#75

Open
teddmason wants to merge 6 commits intodevelopmentfrom
feature/NI-161
Open

Feature/ni 161 - Meteoalarm message post#75
teddmason wants to merge 6 commits intodevelopmentfrom
feature/NI-161

Conversation

@teddmason
Copy link
Member

No description provided.

@sonarqubecloud
Copy link

},
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed when the code is running outside a local development environment. Bypassing server certificate checks is a security risk that can be avoided.

When running the code in a local development environment I think a better solution is to make intermediate CA certificates available to Node.js using the NODE_EXTRA_CA_CERTS environment variable. This approach worked for me locally using a simple program to perform a HTTP GET to the Meteoalarm API using axios.

Without the NODE_EXTRA_CA_CERTS environment set, the test program responded with "unable to get local issuer certificate".

Comment on lines +65 to +67
httpsAgent: new https.Agent({
rejectUnauthorized: false
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed when the code is running outside a local development environment. Bypassing server certificate checks is a security risk that can be avoided.

When running the code in a local development environment I think a better solution is to make intermediate CA certificates available to Node.js using the NODE_EXTRA_CA_CERTS environment variable. This approach worked for me locally using a simple program to perform a HTTP GET to the Meteoalarm API using axios.

Without the NODE_EXTRA_CA_CERTS environment set, the test program responded with "unable to get local issuer certificate".

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.

2 participants