diff --git a/lib/crawler/url_validator.rb b/lib/crawler/url_validator.rb index bb78a8c..bfc32ab 100644 --- a/lib/crawler/url_validator.rb +++ b/lib/crawler/url_validator.rb @@ -67,7 +67,7 @@ class InvalidCrawlConfigError < Error; end attr_reader :raw_url, :checks, :results, :url_crawl_result def initialize(url:, crawl_config:, checks: nil) - if configuration && configuration.crawler_domains.empty? + if crawl_config && crawl_config.domain_allowlist.empty? raise InvalidCrawlConfigError, 'Please configure at least one domain in the crawl config file.' end diff --git a/lib/crawler/url_validator/url_request_check_concern.rb b/lib/crawler/url_validator/url_request_check_concern.rb index 0b9c076..468b26e 100644 --- a/lib/crawler/url_validator/url_request_check_concern.rb +++ b/lib/crawler/url_validator/url_request_check_concern.rb @@ -123,7 +123,7 @@ def redirect_validation_result(details) # rubocop:disable Metrics/AbcSize end # If we're running in a domain context, this is an inter-domain redirect that we cannot follow - unless configuration + unless @crawl_config return validation_fail(:url_request, <<~MESSAGE, details) The web server at #{url} redirected us to a different domain URL (#{location}). If you want to crawl this site, please use #{location.domain_name} as the domain name.