Disable domain based routing for now

This commit is contained in:
Harshavardhana
2015-04-30 21:15:53 -07:00
parent f3078d047c
commit bbc32d6ac0
4 changed files with 16 additions and 13 deletions

View File

@@ -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
}