fix fetch http config file not parse env
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
"github.com/zu1k/proxypool/config"
|
||||
@@ -70,5 +71,14 @@ func FetchNewConfigFileThenInit() {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
if domain := os.Getenv("DOMAIN"); domain != "" {
|
||||
config.SourceConfig.Domain = domain
|
||||
}
|
||||
if cfEmail := os.Getenv("CF_API_EMAIL"); cfEmail != "" {
|
||||
config.SourceConfig.CFEmail = cfEmail
|
||||
}
|
||||
if cfKey := os.Getenv("CF_API_KEY"); cfKey != "" {
|
||||
config.SourceConfig.CFKey = cfKey
|
||||
}
|
||||
InitGetters(config.SourceConfig.Sources)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user