Skip to content

InsecureSkipVerify#90

Draft
ademidov wants to merge 2 commits intomasterfrom
notls
Draft

InsecureSkipVerify#90
ademidov wants to merge 2 commits intomasterfrom
notls

Conversation

@ademidov
Copy link

@ademidov ademidov commented Feb 3, 2025

No description provided.

Database: config.GetString("database.database"),
PoolSize: config.GetInt("database.pool"),
TLSConfig: &tls.Config{
InsecureSkipVerify: true,

Choose a reason for hiding this comment

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

@ademidov Насколько я понял, рекомендуется еще явно пропихнуть сюда сертификат, чтобы убедиться, что будет использоваться именно он (а не какой-то дефолтный из /etc/ssl/certs/), но это будет выглядеть немного громоздко. Мы с ChatGPT родили такой пример: https://github.com/madatsci/pg-ssl-demo-deprecated/blob/main/go-app/main.go

Choose a reason for hiding this comment

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

И у меня InsecureSkipVerify: false, чтобы верификация работала.

Choose a reason for hiding this comment

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

Возможно я хотел написать эти комментарии к этому ПР – https://github.com/cryptopay-dev/flame/pull/324/files

func connect(v *viper.Viper) (*sql.DB, error) {
dsn := fmt.Sprintf(
"postgres://%s:%s@%s/%s?sslmode=disable",
"postgres://%s:%s@%s/%s",

Choose a reason for hiding this comment

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

Почему тут вообще отдельный коннект 🤔

Choose a reason for hiding this comment

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

Хотя вижу, так изначально было у Паши

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