|
@ -2,12 +2,12 @@ package s3api |
|
|
|
|
|
|
|
|
import ( |
|
|
import ( |
|
|
"fmt" |
|
|
"fmt" |
|
|
"github.com/chrislusf/seaweedfs/weed/filer" |
|
|
|
|
|
. "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants" |
|
|
|
|
|
"net/http" |
|
|
"net/http" |
|
|
"strings" |
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/chrislusf/seaweedfs/weed/filer" |
|
|
|
|
|
. "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants" |
|
|
"github.com/gorilla/mux" |
|
|
"github.com/gorilla/mux" |
|
|
"google.golang.org/grpc" |
|
|
"google.golang.org/grpc" |
|
|
) |
|
|
) |
|
@ -44,6 +44,10 @@ func NewS3ApiServer(router *mux.Router, option *S3ApiServerOption) (s3ApiServer |
|
|
func (s3a *S3ApiServer) registerRouter(router *mux.Router) { |
|
|
func (s3a *S3ApiServer) registerRouter(router *mux.Router) { |
|
|
// API Router
|
|
|
// API Router
|
|
|
apiRouter := router.PathPrefix("/").Subrouter() |
|
|
apiRouter := router.PathPrefix("/").Subrouter() |
|
|
|
|
|
|
|
|
|
|
|
// Readiness Probe
|
|
|
|
|
|
apiRouter.Methods("GET").Path("/status").HandlerFunc(s3a.StatusHandler) |
|
|
|
|
|
|
|
|
var routers []*mux.Router |
|
|
var routers []*mux.Router |
|
|
if s3a.option.DomainName != "" { |
|
|
if s3a.option.DomainName != "" { |
|
|
domainNames := strings.Split(s3a.option.DomainName, ",") |
|
|
domainNames := strings.Split(s3a.option.DomainName, ",") |
|
|