Skip to content

Commit b67ae03

Browse files
sethherrclaude
andcommitted
Fall back to the real storage domains in BlobUrl
Matches STORAGE_HOST above, and drops the compact_blank that only existed because the values could be missing. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 12216a8 commit b67ae03

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/services/blob_url.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ module BlobUrl
77
SERVICE = Bikeindex::Application.config.active_storage.service
88
LOCAL_STORAGE = %i[local test].include?(SERVICE)
99
STORAGE_HOST = ENV.fetch("ACTIVE_STORAGE_HOST", "https://uploads.bikeindex.org")
10-
# Non-production buckets each have their own domain; a service that isn't listed (or whose
11-
# domain isn't configured) serves from the production one
12-
STORAGE_HOSTS = {cloudflare_dev: ENV["ACTIVE_STORAGE_HOST_DEV"],
13-
cloudflare_test: ENV["ACTIVE_STORAGE_HOST_TEST"]}.compact_blank.freeze
10+
# Non-production buckets each have their own domain; a service that isn't listed serves
11+
# from the production one
12+
STORAGE_HOSTS = {
13+
cloudflare_dev: ENV.fetch("ACTIVE_STORAGE_HOST_DEV", "https://dev-uploads.bikeindex.org"),
14+
cloudflare_test: ENV.fetch("ACTIVE_STORAGE_HOST_TEST", "https://test-uploads.bikeindex.org")
15+
}.freeze
1416

1517
def for(blob = nil)
1618
return if blob.blank?

0 commit comments

Comments
 (0)