mirror of
https://github.com/minio/minio.git
synced 2025-02-26 12:59:17 -05:00
web-browser: disable minio browser when environmental variable MINIO_BROWSER=off (#2315)
fixes #2314
This commit is contained in:
parent
f503ac3db8
commit
7850d17f48
@ -19,6 +19,8 @@ package main
|
|||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
router "github.com/gorilla/mux"
|
router "github.com/gorilla/mux"
|
||||||
)
|
)
|
||||||
@ -62,7 +64,13 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
|
|||||||
|
|
||||||
// Register all routers.
|
// Register all routers.
|
||||||
registerStorageRPCRouter(mux, storageRPC)
|
registerStorageRPCRouter(mux, storageRPC)
|
||||||
|
|
||||||
|
// set environmental variable MINIO_BROWSER=off to disable minio web browser.
|
||||||
|
// By default minio web browser is enabled.
|
||||||
|
if !strings.EqualFold(os.Getenv("MINIO_BROWSER"), "off") {
|
||||||
registerWebRouter(mux, webHandlers)
|
registerWebRouter(mux, webHandlers)
|
||||||
|
}
|
||||||
|
|
||||||
registerAPIRouter(mux, apiHandlers)
|
registerAPIRouter(mux, apiHandlers)
|
||||||
// Add new routers here.
|
// Add new routers here.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user