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

Add sslmode in the postgres connection string #1

Open
rizahmeds opened this issue Feb 29, 2024 · 1 comment
Open

Add sslmode in the postgres connection string #1

rizahmeds opened this issue Feb 29, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@rizahmeds
Copy link

connectionString := fmt.Sprintf("host=%s port=%s user=%s password=%s dbname=%s", v.Host, v.Port, v.User, v.Password, v.DBName)

In the above postgres connection string sslmode is not mentioned. By default sslmode take the require parameter which is not good for local development purpose.
Ref: https://pkg.go.dev/github.com/lib/pq#hdr-Connection_String_Parameters

We should set that as sslmode=disable in .env file and if it is in production we can set different value.

@ibilalkayy
Copy link
Owner

ibilalkayy commented Feb 29, 2024

Thank you, @rizahmeds for pointing this out. I added the sslmode.

Here it is: Link

@ibilalkayy ibilalkayy added bug Something isn't working good first issue Good for newcomers labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants