Skip to content

Commit

Permalink
Merge branch 'main' into jedrazb-fix-internal-links
Browse files Browse the repository at this point in the history
  • Loading branch information
jedrazb authored May 29, 2024
2 parents 9a1a0fd + 38ded72 commit cd9ff82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/crawler/url_validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/crawler/url_validator/url_request_check_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit cd9ff82

Please sign in to comment.