config: Add browser parameter (#3807)

browser new parameter receives "on" or "off" parameter which is similar
to MINIO_BROWSER
This commit is contained in:
Anis Elleuch
2017-02-27 23:59:53 +01:00
committed by Harshavardhana
parent c9619673fb
commit 9b3c014bab
9 changed files with 290 additions and 38 deletions

View File

@@ -19,9 +19,7 @@ package cmd
import (
"crypto/x509"
"net/url"
"os"
"runtime"
"strings"
"time"
humanize "github.com/dustin/go-humanize"
@@ -74,9 +72,12 @@ var (
// Indicates if the running minio server is an erasure-code backend.
globalIsXL = false
// This flag is set to 'true' by default, it is set to `false`
// when MINIO_BROWSER env is set to 'off'.
globalIsBrowserEnabled = !strings.EqualFold(os.Getenv("MINIO_BROWSER"), "off")
// This flag is set to 'true' by default
globalIsBrowserEnabled = true
// This flag is set to 'true' when MINIO_BROWSER env is set.
globalIsEnvBrowser = false
// Set to true if credentials were passed from env, default is false.
globalIsEnvCreds = false
// Maximum cache size. Defaults to disabled.
// Caching is enabled only for RAM size > 8GiB.
@@ -113,9 +114,6 @@ var (
// Minio server user agent string.
globalServerUserAgent = "Minio/" + ReleaseTag + " (" + runtime.GOOS + "; " + runtime.GOARCH + ")"
// Set to true if credentials were passed from env, default is false.
globalIsEnvCreds = false
// url.URL endpoints of disks that belong to the object storage.
globalEndpoints = []*url.URL{}