config: Relax browser and region to be empty. (#3912)

- If browser field is missing or empty
  then default to "on".

- If region field is empty or missing then
  default to "us-east-1" (S3 spec behavior)
This commit is contained in:
Harshavardhana
2017-03-16 11:06:17 -07:00
committed by GitHub
parent 3edff1501e
commit f3334159a4
3 changed files with 52 additions and 25 deletions
+4 -2
View File
@@ -128,7 +128,7 @@ func initConfig() {
console.Fatalf("Invalid access/secret Key set in environment. Err: %s.\n", err)
}
// Envs are set globally.
// credential Envs are set globally.
globalIsEnvCreds = true
}
@@ -138,7 +138,9 @@ func initConfig() {
console.Fatalf("Invalid value %s in MINIO_BROWSER environment variable.", browser)
}
globalIsEnvBrowser = strings.EqualFold(browser, "off")
// browser Envs are set globally, this doesn't represent
// if browser is turned off or on.
globalIsEnvBrowser = true
}
envs := envParams{