mirror of
https://github.com/minio/minio.git
synced 2025-02-26 04:49:16 -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
10
routers.go
10
routers.go
@ -19,6 +19,8 @@ package main
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
router "github.com/gorilla/mux"
|
||||
)
|
||||
@ -62,7 +64,13 @@ func configureServerHandler(srvCmdConfig serverCmdConfig) http.Handler {
|
||||
|
||||
// Register all routers.
|
||||
registerStorageRPCRouter(mux, storageRPC)
|
||||
registerWebRouter(mux, webHandlers)
|
||||
|
||||
// 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)
|
||||
}
|
||||
|
||||
registerAPIRouter(mux, apiHandlers)
|
||||
// Add new routers here.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user