17 lines
370 B
Ruby
17 lines
370 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Current < ActiveSupport::CurrentAttributes
|
|
attribute :baffle_host
|
|
attribute :baffle_internal_host
|
|
attribute :project
|
|
attribute :ip
|
|
|
|
def baffle_host
|
|
@baffle_host || ENV.fetch("BAFFLE_HOST", "localhost:3000")
|
|
end
|
|
|
|
def baffle_internal_host
|
|
@baffle_internal_host || ENV.fetch("BAFFLE_INTERNAL_HOST", nil)
|
|
end
|
|
end
|