Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for extractAPIVersion (1.77 sec)

  1. cmd/handler-utils.go

    		bucket := strings.TrimSuffix(xhost.Name, "."+domain)
    		return SlashSeparator + pathJoin(bucket, path), nil
    	}
    	return path, nil
    }
    
    var regexVersion = regexp.MustCompile(`^/minio.*/(v\d+)/.*`)
    
    func extractAPIVersion(r *http.Request) string {
    	if matches := regexVersion.FindStringSubmatch(r.URL.Path); len(matches) > 1 {
    		return matches[1]
    	}
    	return "unknown"
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 04 12:04:40 GMT 2024
    - 15.5K bytes
    - Viewed (3)
Back to top