-
Notifications
You must be signed in to change notification settings - Fork 572
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
feat: add SHIORI_PG_SSLMODE #536
Conversation
Some managed hosting providers don't support sslmode=disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @refi64, thanks for the contribution! This looks good to go, though I have made a small comment on the flag check in case you want to clarify that for me. If you think that's good as it is, we can merge this into dev.
internal/cmd/root.go
Outdated
@@ -135,8 +135,12 @@ func openPostgreSQLDatabase(ctx context.Context) (database.DB, error) { | |||
user, _ := os.LookupEnv("SHIORI_PG_USER") | |||
password, _ := os.LookupEnv("SHIORI_PG_PASS") | |||
dbName, _ := os.LookupEnv("SHIORI_PG_NAME") | |||
sslmode, ok := os.LookupEnv("SHIORI_PG_SSLMODE") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep in mind that in this case ok
will be true
in the case SHIORI_PG_SSLMODE
is an empty string. Unsure how Posgres will react to that. Maybe is better to check for sslMode == ""
.
When will this PR be merged into the master? |
Waiting for this comment to be addressed. |
Thank you for your contribution! |
Some managed hosting providers don't support sslmode=disabled.