From b8ed884a86d5cd09631241df08d9de0da5421afd Mon Sep 17 00:00:00 2001 From: AdiAkhileshSingh15 Date: Wed, 2 Aug 2023 23:44:02 +0530 Subject: [PATCH] removed ssl --- cmd/web/.env | 2 +- cmd/web/main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/web/.env b/cmd/web/.env index 6294fdd..d125d3b 100644 --- a/cmd/web/.env +++ b/cmd/web/.env @@ -3,6 +3,6 @@ DB_USER=postgres DB_PASS=IMNKyIMdKVtc4bfFloaD DB_HOST=bookmyroom.ckzlaalx1suy.ap-south-1.rds.amazonaws.com DB_PORT=5432 -SSL_MODE=verify-full +# SSL_MODE=verify-full PRODUCTION=true CACHE=true \ No newline at end of file diff --git a/cmd/web/main.go b/cmd/web/main.go index 929f803..929c967 100644 --- a/cmd/web/main.go +++ b/cmd/web/main.go @@ -66,7 +66,7 @@ func run() (*driver.DB, error) { dbUser := os.Getenv("DB_USER") dbPass := os.Getenv("DB_PASS") dbPort := os.Getenv("DB_PORT") - dbSSL := os.Getenv("SSL_MODE") + // dbSSL := os.Getenv("SSL_MODE") if inProduction == "true" { app.InProduction = true @@ -105,7 +105,7 @@ func run() (*driver.DB, error) { // connect to database log.Println("Connecting to database...") - connectionString := fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s sslmode=%s", dbHost, dbPort, dbName, dbUser, dbPass, dbSSL) + connectionString := fmt.Sprintf("host=%s port=%s dbname=%s user=%s password=%s", dbHost, dbPort, dbName, dbUser, dbPass) db, err := driver.ConnectSQL(connectionString) if err != nil { log.Fatal("Cannot connect to database! Dying...")