mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
FIX: If the host can't be extracted don't raise an error
This commit is contained in:
@ -1,6 +1,8 @@
|
|||||||
class IncomingDomain < ActiveRecord::Base
|
class IncomingDomain < ActiveRecord::Base
|
||||||
def self.add!(uri)
|
def self.add!(uri)
|
||||||
name = uri.host
|
name = uri.host
|
||||||
|
return unless name.present?
|
||||||
|
|
||||||
https = uri.scheme == "https"
|
https = uri.scheme == "https"
|
||||||
port = uri.port
|
port = uri.port
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user