@@ -519,7 +519,7 @@ func (p *S3FSPlugin) Validate(cfg map[string]interface{}) error {
519519 // Check for unknown parameters
520520 allowedKeys := []string {
521521 "bucket" , "region" , "access_key_id" , "secret_access_key" , "endpoint" , "prefix" , "disable_ssl" , "mount_path" ,
522- "cache_enabled" , "cache_ttl" , "stat_cache_ttl" , "cache_max_size" ,
522+ "cache_enabled" , "cache_ttl" , "stat_cache_ttl" , "cache_max_size" , "use_path_request_style" ,
523523 }
524524 if err := config .ValidateOnlyKnownKeys (cfg , allowedKeys ); err != nil {
525525 return err
@@ -538,7 +538,7 @@ func (p *S3FSPlugin) Validate(cfg map[string]interface{}) error {
538538 }
539539
540540 // Validate boolean parameters
541- for _ , key := range []string {"disable_ssl" , "cache_enabled" } {
541+ for _ , key := range []string {"disable_ssl" , "use_path_request_style" , " cache_enabled" } {
542542 if err := config .ValidateBoolType (cfg , key ); err != nil {
543543 return err
544544 }
@@ -559,6 +559,7 @@ func (p *S3FSPlugin) Initialize(config map[string]interface{}) error {
559559 Endpoint : getStringConfig (config , "endpoint" , "" ),
560560 Prefix : getStringConfig (config , "prefix" , "" ),
561561 DisableSSL : getBoolConfig (config , "disable_ssl" , false ),
562+ UsePathStyle : getBoolConfig (config , "use_path_request_style" , false ),
562563 }
563564
564565 if cfg .Bucket == "" {
@@ -643,6 +644,13 @@ func (p *S3FSPlugin) GetConfigParams() []plugin.ConfigParameter {
643644 Default : "false" ,
644645 Description : "Disable SSL for S3 connections" ,
645646 },
647+ {
648+ Name : "use_path_request_style" ,
649+ Type : "bool" ,
650+ Required : false ,
651+ Default : "false" ,
652+ Description : "Use path-style requests instead of virtual-hosted-style (required for MinIO and some S3-compatible services)" ,
653+ },
646654 {
647655 Name : "cache_enabled" ,
648656 Type : "bool" ,
@@ -718,6 +726,7 @@ CONFIGURATION:
718726 secret_access_key = "minioadmin"
719727 endpoint = "http://localhost:9000"
720728 disable_ssl = true
729+ use_path_request_style = true # Required for MinIO and some S3-compatible services
721730
722731 Multiple S3 Buckets:
723732 [plugins.s3fs_prod]
0 commit comments