Skip to content

Commit c32787c

Browse files
Fix incorrect file path
1 parent 56e29e5 commit c32787c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • internal/app/traefik-github-oauth-server

internal/app/traefik-github-oauth-server/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ type Config struct {
2020
}
2121

2222
func envString(key string) string {
23-
value := os.Getenv(key)
24-
if strings.HasSuffix(key, "_FILE") && value != "" {
23+
fileKey := key + "_FILE"
24+
if value := os.Getenv(fileKey); value != "" {
2525
content, err := os.ReadFile(value)
2626
if err != nil {
27-
return ""
27+
return os.Getenv(key)
2828
}
2929
return strings.TrimSpace(string(content))
3030
}
31-
return value
31+
return os.Getenv(key)
3232
}
3333

3434
func envWithDefault(key string, defaultValue string) string {

0 commit comments

Comments
 (0)