Update URL generator heuristic
parent
7d4ea8104f
commit
d0cc254884
|
@ -9,8 +9,8 @@ module Api
|
|||
attr_reader :cache
|
||||
|
||||
CACHE_KEY_TPL = "mqtt_limiter:%s"
|
||||
TTL = 60 * 5 # Ten Minutes
|
||||
PER_DEVICE_MAX = 10
|
||||
TTL = 60 * 5 # Five Minutes
|
||||
PER_DEVICE_MAX = 20
|
||||
MAX_GUEST_COUNT = 256
|
||||
WARNING = "'%s' was rate limited."
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ class Image < ApplicationRecord
|
|||
def regular_url
|
||||
if BUCKET
|
||||
# Not sure why. TODO: Investigate why Rails URL helpers don't work here.
|
||||
"https://storage.cloud.google.com/#{BUCKET}/#{attachment.key}"
|
||||
"https://storage.googleapis.com/#{BUCKET}/#{attachment.key}"
|
||||
else
|
||||
Rails
|
||||
.application
|
||||
|
|
Loading…
Reference in New Issue