lib/routemaster/config.rb in routemaster-drain-3.0.2 vs lib/routemaster/config.rb in routemaster-drain-3.0.3
- old
+ new
@@ -52,10 +52,10 @@
# means we would need to worry about purging caches at the end of the period.
Integer(ENV.fetch('ROUTEMASTER_CACHE_EXPIRY', 86_400 * 90))
end
def cache_auth
- @cache_auth ||= Hashie::Rash.new.tap do |result|
+ Hashie::Rash.new.tap do |result|
ENV.fetch('ROUTEMASTER_CACHE_AUTH', '').split(',').each do |entry|
host, username, password = entry.split(':')
result[Regexp.new(host)] = [username, password]
end
end