Add a rules controller
This commit is contained in:
@@ -43,15 +43,16 @@ class Project < ApplicationRecord
|
||||
end
|
||||
|
||||
def dsn
|
||||
host = Current.baffle_host || "localhost:3000"
|
||||
host = Current.baffle_host || ENV.fetch("BAFFLE_HOST", "localhost:3000")
|
||||
protocol = host.include?("localhost") ? "http" : "https"
|
||||
"#{protocol}://#{public_key}@#{host}/#{slug}"
|
||||
end
|
||||
|
||||
def internal_dsn
|
||||
return nil unless Current.baffle_internal_host.present?
|
||||
internal_host = Current.baffle_internal_host || ENV.fetch("BAFFLE_INTERNAL_HOST", nil)
|
||||
return nil unless internal_host.present?
|
||||
|
||||
host = Current.baffle_internal_host
|
||||
host = internal_host
|
||||
protocol = "http" # Internal connections use HTTP
|
||||
"#{protocol}://#{public_key}@#{host}/#{slug}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user