Commit 590cc1d4 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'comment-url-validator-cycle' into 'master'

Comment why we can't use Gitlab::CurrentSettings

See merge request gitlab-org/gitlab-ce!25412
parents 678f55da 89f7bac3
...@@ -93,6 +93,12 @@ class UrlValidator < ActiveModel::EachValidator ...@@ -93,6 +93,12 @@ class UrlValidator < ActiveModel::EachValidator
end end
def allow_setting_local_requests? def allow_setting_local_requests?
# We cannot use Gitlab::CurrentSettings as ApplicationSetting itself
# uses UrlValidator to validate urls. This ends up in a cycle
# when Gitlab::CurrentSettings creates an ApplicationSetting which then
# calls this validator.
# See
ApplicationSetting.current&.allow_local_requests_from_hooks_and_services? ApplicationSetting.current&.allow_local_requests_from_hooks_and_services?
end end
end end
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment