Skip to content
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

[MongoDB] Adding an option to disable TLS #459

Merged
merged 3 commits into from
Aug 5, 2024
Merged

Conversation

Tang8330
Copy link
Collaborator

@Tang8330 Tang8330 commented Aug 5, 2024

We need the ability to disable TLS so we can support DocumentDB.

@Tang8330 Tang8330 marked this pull request as ready for review August 5, 2024 20:31
opts := options.Client().ApplyURI(cfg.Host).SetAuth(creds).SetTLSConfig(&tls.Config{})
opts := options.Client().ApplyURI(cfg.Host).SetAuth(creds)
if !cfg.DisableTLS {
opts.SetTLSConfig(&tls.Config{})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to be opts := opts.SetTLSConfig(&tls.Config{})?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Nope, but we can add it for more clarity

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

func (c *ClientOptions) SetTLSConfig(cfg *tls.Config) *ClientOptions {
	c.TLSConfig = cfg
	return c
}

@Tang8330 Tang8330 merged commit dea17ce into master Aug 5, 2024
6 checks passed
@Tang8330 Tang8330 deleted the add-option-disable-tls branch August 5, 2024 20:48
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