summaryrefslogtreecommitdiff
path: root/app/models/hooks/system_hook.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/hooks/system_hook.rb')
-rw-r--r--app/models/hooks/system_hook.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/hooks/system_hook.rb b/app/models/hooks/system_hook.rb
index 90b4588a325..3d54d17e787 100644
--- a/app/models/hooks/system_hook.rb
+++ b/app/models/hooks/system_hook.rb
@@ -14,8 +14,10 @@ class SystemHook < WebHook
default_value_for :repository_update_events, true
default_value_for :merge_requests_events, false
+ validates :url, system_hook_url: true
+
# Allow urls pointing localhost and the local network
def allow_local_requests?
- true
+ Gitlab::CurrentSettings.allow_local_requests_from_system_hooks?
end
end