Add IMGPROXY_BASE_URL param

This commit is contained in:
DarthSim
2018-04-26 17:38:40 +06:00
parent 04871c8b7f
commit bcd9dfe809
3 changed files with 11 additions and 1 deletions

View File

@@ -101,6 +101,8 @@ type config struct {
ETagEnabled bool
ETagSignature []byte
BaseURL string
}
var conf = config{
@@ -155,6 +157,8 @@ func init() {
boolEnvConfig(&conf.ETagEnabled, "IMGPROXY_USE_ETAG")
strEnvConfig(&conf.BaseURL, "IMGPROXY_BASE_URL")
if len(conf.Key) == 0 {
log.Fatalln("Key is not defined")
}