diff --git a/broker/client/reader.go b/broker/client/reader.go index b2044f56..ea912d8d 100644 --- a/broker/client/reader.go +++ b/broker/client/reader.go @@ -175,7 +175,7 @@ func (r *Reader) Read(p []byte) (n int, err error) { // If the frame preceding EOF provided a fragment URL, open it directly. if !r.Request.MetadataOnly && r.Response.Status == pb.Status_OK && r.Response.FragmentUrl != "" { - if SkipSignedURLs { + if SkipSignedURLs > 0 { fragURL := r.Response.Fragment.BackingStore.URL() if fragURL.Scheme != "gs" { return 0, fmt.Errorf("SkipSignedURL unsupported scheme: %s", fragURL.Scheme) @@ -483,7 +483,7 @@ var ( // stores_test.go, which is in broker/fragment, imports broker/client so we cannot import broker/fragment here // to avoid a cycle. Instead we will repeat a subset of store_gcs.go. -var SkipSignedURLs = false +var SkipSignedURLs = uint32(0) var gcs = &gcsBackend{} type gcsBackend struct { diff --git a/mainboilerplate/runconsumer/run_consumer.go b/mainboilerplate/runconsumer/run_consumer.go index 10da412c..c53f2e1a 100644 --- a/mainboilerplate/runconsumer/run_consumer.go +++ b/mainboilerplate/runconsumer/run_consumer.go @@ -79,7 +79,7 @@ type BaseConfig struct { Limit uint32 `long:"limit" env:"LIMIT" default:"32" description:"Maximum number of Shards this consumer process will allocate"` MaxHotStandbys uint32 `long:"max-hot-standbys" env:"MAX_HOT_STANDBYS" default:"3" description:"Maximum effective hot standbys of any one shard, which upper-bounds its stated hot-standbys."` WatchDelay time.Duration `long:"watch-delay" env:"WATCH_DELAY" default:"30ms" description:"Delay applied to the application of watched Etcd events. Larger values amortize the processing of fast-changing Etcd keys."` - SkipSignedURLs bool `long:"skip-signed-urls" env:"SKIP_SIGNED_URLS" description:"When a signed URL is received, use fragment info instead to retrieve data with auth header. This is useful when clients do not wish/require the signing."` + SkipSignedURLs uint32 `long:"skip-signed-urls" env:"SKIP_SIGNED_URLS" default:"1" description:"When a signed URL is received, use fragment info instead to retrieve data with auth header. This is useful when clients do not wish/require the signing."` } `group:"Consumer" namespace:"consumer" env-namespace:"CONSUMER"` Broker struct {