mirror of
https://github.com/minio/minio.git
synced 2025-11-08 21:24:55 -05:00
Disable domain based routing for now
This commit is contained in:
@@ -47,6 +47,7 @@ func pathMux(api minioAPI, mux *router.Router) *router.Router {
|
||||
return mux
|
||||
}
|
||||
|
||||
/*
|
||||
// Domain based routing
|
||||
func domainMux(api minioAPI, mux *router.Router) *router.Router {
|
||||
mux.HandleFunc("/",
|
||||
@@ -63,15 +64,16 @@ func domainMux(api minioAPI, mux *router.Router) *router.Router {
|
||||
|
||||
return mux
|
||||
}
|
||||
*/
|
||||
|
||||
// Get proper router based on domain availability
|
||||
func getMux(api minioAPI, mux *router.Router) *router.Router {
|
||||
switch true {
|
||||
case api.domain == "":
|
||||
return pathMux(api, mux)
|
||||
case api.domain != "":
|
||||
s := mux.Host(api.domain).Subrouter()
|
||||
return domainMux(api, s)
|
||||
// case api.domain != "":
|
||||
// s := mux.Host(api.domain).Subrouter()
|
||||
// return domainMux(api, s)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ type Config struct {
|
||||
CertFile string
|
||||
KeyFile string
|
||||
Websocket bool // TODO
|
||||
Domain string
|
||||
// Domain string
|
||||
}
|
||||
|
||||
// Server - http server related
|
||||
|
||||
@@ -41,7 +41,8 @@ type MemoryFactory struct {
|
||||
func (f MemoryFactory) GetStartServerFunc() StartServerFunc {
|
||||
return func() (chan<- string, <-chan error) {
|
||||
_, _, driver := memory.Start(f.MaxMemory, 1*time.Hour)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler(f.Domain, driver), f.Config)
|
||||
//ctrl, status, _ := httpserver.Start(api.HTTPHandler(f.Domain, driver), f.Config)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler("", driver), f.Config)
|
||||
return ctrl, status
|
||||
}
|
||||
}
|
||||
@@ -69,7 +70,7 @@ type DonutFactory struct {
|
||||
func (f DonutFactory) GetStartServerFunc() StartServerFunc {
|
||||
return func() (chan<- string, <-chan error) {
|
||||
_, _, driver := donut.Start(f.Paths)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler(f.Domain, driver), f.Config)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler("", driver), f.Config)
|
||||
return ctrl, status
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user