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
end
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 https://gitlab.com/gitlab-org/gitlab-ee/issues/9833
ApplicationSetting.current&.allow_local_requests_from_hooks_and_services?
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment