Align JS/TS sample SSL configuration#154
Merged
danielfrankcom merged 1 commit intomainfrom May 27, 2025
Merged
Conversation
mitchell-elholm
approved these changes
May 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR aligns the SSL configuration in the various JS/TS samples.
I originally noticed the inconsistencies after spotting
mode: 'verify-full'in the Sequelize configuration. From what I could see in the docs this doesn't appear to be a valid configuration, as thesslblock configures the underlyingTLSSocketconfiguration here.Both of the TS ORMs use
node-postgresunder the hood, and seem to pass the SSL configuration to the underlying driver.postgres-jsseems to configure SSL in the same way according to the docs.Since all 4 of these samples can be configured the same way, I've aligned their configuration to set
rejectUnauthorized: true, which is the equivalent ofverify-fullin other languages. For some of the drivers this is already the default, but being explicit about the configuration doesn't hurt and we are already explicitly configuring other defaults like the port number.As part of this change I also removed the certificate download for TypeORM, since Node appears to provide the AWS cert already in its default trust store.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT-0 license.