Add url validation to Web::PushSubscription endpoints (#30540)
This commit is contained in:
parent
048f9b9d45
commit
eef2cc054f
2 changed files with 15 additions and 2 deletions
|
@ -21,7 +21,7 @@ class Web::PushSubscription < ApplicationRecord
|
|||
|
||||
has_one :session_activation, foreign_key: 'web_push_subscription_id', inverse_of: :web_push_subscription, dependent: nil
|
||||
|
||||
validates :endpoint, presence: true
|
||||
validates :endpoint, presence: true, url: true
|
||||
validates :key_p256dh, presence: true
|
||||
validates :key_auth, presence: true
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue