Skip to content

Commit

Permalink
feat: allow @ and % in webhook urls
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Feb 14, 2022
1 parent 889e7bc commit c60c69d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/webhook.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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) }

Expand Down

0 comments on commit c60c69d

Please sign in to comment.