mirror of
https://github.com/benbjohnson/litestream.git
synced 2026-01-25 05:06:30 +00:00
Add alternate Tigris endpoint (#906)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user