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

Ignore setting OCSP env if already set #1199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"io"
"net/http"
"net/url"
"os"
"regexp"
"strconv"
"sync"
Expand Down Expand Up @@ -773,8 +774,12 @@ func buildSnowflakeConn(ctx context.Context, config Config) (*snowflakeConn, err
// use the custom transport
st = sc.cfg.Transporter
}
if err = setupOCSPEnvVars(sc.ctx, sc.cfg.Host); err != nil {
return nil, err

// only set OCSP envs if not already set
if _, set := os.LookupEnv(cacheServerURLEnv); !set {
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you move this check to ocsp.go to setupOCSPEnvVars function?

if err = setupOCSPEnvVars(sc.ctx, sc.cfg.Host); err != nil {
return nil, err
}
}
var tokenAccessor TokenAccessor
if sc.cfg.TokenAccessor != nil {
Expand Down