mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 14:10:25 +03:00
Add domain and subdomain support for MinioAPI
This change brings in domain and subdomain support - ./minio --domain "yourminiodomain.com" This change brings in a much needed feature by keeping bucketnames as part of your 'DNS' name. All your existing applications can be migrated off from s3 to Minio without little to no modifications. NOTE: Setting up DNS for your `buckets` is out of scope of this feature
This commit is contained in:
@@ -41,6 +41,7 @@ func getStorageType(input string) server.StorageType {
|
||||
|
||||
func runCmd(c *cli.Context) {
|
||||
storageTypeStr := c.String("storage-type")
|
||||
domain := c.String("domain")
|
||||
apiaddress := c.String("api-address")
|
||||
webaddress := c.String("web-address")
|
||||
certFile := c.String("cert")
|
||||
@@ -52,6 +53,7 @@ func runCmd(c *cli.Context) {
|
||||
storageType := getStorageType(storageTypeStr)
|
||||
var serverConfigs []server.ServerConfig
|
||||
apiServerConfig := server.ServerConfig{
|
||||
Domain: domain,
|
||||
Address: apiaddress,
|
||||
Tls: tls,
|
||||
CertFile: certFile,
|
||||
@@ -61,6 +63,7 @@ func runCmd(c *cli.Context) {
|
||||
},
|
||||
}
|
||||
webUiServerConfig := server.ServerConfig{
|
||||
Domain: domain,
|
||||
Address: webaddress,
|
||||
Tls: false,
|
||||
CertFile: "",
|
||||
@@ -79,6 +82,11 @@ func main() {
|
||||
app.Name = "minio"
|
||||
app.Usage = ""
|
||||
app.Flags = []cli.Flag{
|
||||
cli.StringFlag{
|
||||
Name: "domain,d",
|
||||
Value: "",
|
||||
Usage: "address for incoming API requests",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "api-address,a",
|
||||
Value: ":9000",
|
||||
|
||||
Reference in New Issue
Block a user