feat: allow @ and % in webhook urls

This commit is contained in:
Adam Cooke
2022-02-14 16:12:47 +00:00
parent 889e7bc9cf
commit c60c69db18
+1 -1
View File
@@ -28,7 +28,7 @@ class Webhook < ApplicationRecord
has_many :webhook_requests
validates :name, :presence => true
validates :url, :presence => true, :format => {:with => /\Ahttps?\:\/\/[a-z0-9\-\.\_\?\=\&\/\+:]+\z/i, :allow_blank => true}
validates :url, :presence => true, :format => {:with => /\Ahttps?\:\/\/[a-z0-9\-\.\_\?\=\&\/\+:%@]+\z/i, :allow_blank => true}
scope :enabled, -> { where(:enabled => true) }