We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56e29e5 commit c32787cCopy full SHA for c32787c
1 file changed
internal/app/traefik-github-oauth-server/config.go
@@ -20,15 +20,15 @@ type Config struct {
20
}
21
22
func envString(key string) string {
23
- value := os.Getenv(key)
24
- if strings.HasSuffix(key, "_FILE") && value != "" {
+ fileKey := key + "_FILE"
+ if value := os.Getenv(fileKey); value != "" {
25
content, err := os.ReadFile(value)
26
if err != nil {
27
- return ""
+ return os.Getenv(key)
28
29
return strings.TrimSpace(string(content))
30
31
- return value
32
33
34
func envWithDefault(key string, defaultValue string) string {
0 commit comments