Add alternate Tigris endpoint (#906)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ben Johnson
2025-12-16 13:42:40 -07:00
committed by GitHub
parent e2cbaf452f
commit fa0ba8efc7
2 changed files with 7 additions and 2 deletions

View File

@@ -190,7 +190,7 @@ func BoolQueryValue(query url.Values, keys ...string) (value bool, ok bool) {
// IsTigrisEndpoint returns true if the endpoint is the Tigris object storage service.
func IsTigrisEndpoint(endpoint string) bool {
host := extractEndpointHost(endpoint)
return host == "fly.storage.tigris.dev"
return host == "fly.storage.tigris.dev" || host == "t3.storage.dev"
}
// IsDigitalOceanEndpoint returns true if the endpoint is Digital Ocean Spaces.
@@ -257,7 +257,8 @@ func IsMinIOEndpoint(endpoint string) bool {
strings.Contains(host, ".filebase.com") ||
strings.Contains(host, ".scw.cloud") ||
strings.Contains(host, ".r2.cloudflarestorage.com") ||
strings.Contains(host, "tigris.dev") {
strings.Contains(host, "tigris.dev") ||
strings.Contains(host, "t3.storage.dev") {
return false
}
return true

View File

@@ -562,6 +562,10 @@ func TestIsTigrisEndpoint(t *testing.T) {
{"FLY.STORAGE.TIGRIS.DEV", true},
{"https://fly.storage.tigris.dev", true},
{"http://fly.storage.tigris.dev", true},
{"t3.storage.dev", true},
{"T3.STORAGE.DEV", true},
{"https://t3.storage.dev", true},
{"http://t3.storage.dev", true},
{"s3.amazonaws.com", false},
{"localhost:9000", false},
{"", false},