Skip to content

Commit 45023c9

Browse files
committed
fix(core): Always attempt to trim CommandAPIPath of leading or trailing /
1 parent 9e62e2a commit 45023c9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

auth_providers/auth_core.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,12 @@ func (c *CommandAuthConfig) ValidateAuthConfig() error {
270270
}
271271
if c.CommandAPIPath == "" {
272272
if apiPath, ok := os.LookupEnv(EnvKeyfactorAPIPath); ok {
273-
c.CommandAPIPath = strings.Trim(apiPath, "/")
273+
c.CommandAPIPath = apiPath
274274
} else {
275275
c.CommandAPIPath = DefaultCommandAPIPath
276276
}
277277
}
278+
c.CommandAPIPath = strings.Trim(c.CommandAPIPath, "/")
278279
if c.HttpClientTimeout <= 0 {
279280
if timeout, ok := os.LookupEnv(EnvKeyfactorClientTimeout); ok {
280281
configTimeout, tErr := strconv.Atoi(timeout)

0 commit comments

Comments
 (0)