Skip to content

Commit

Permalink
rubocop fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tsusdere committed Apr 12, 2024
1 parent 68a64e8 commit 49e4dad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/github-pages-health-check/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def cname_to_github_user_domain?
def cname_to_domain_to_pages?
a_record_to_pages = dns.select { |d| d.type == Dnsruby::Types::A && d.name.to_s == host }.first

return false unless a_record_to_pages && cname? && !cname_to_pages_dot_github_dot_com? && @wwwcname
return false unless a_record_to_pages && cname? && !cname_to_pages_dot_github_dot_com? && @www_cname

CURRENT_IP_ADDRESSES.include?(a_record_to_pages.address.to_s.downcase)
end
Expand Down Expand Up @@ -416,7 +416,7 @@ def cname

# Check if we have a 'www.' CNAME that matches the domain
def www_cname(cname)
@wwwcname ||= cname.name.to_s.start_with?("www.") &&
@www_cname ||= cname.name.to_s.start_with?("www.") &&
cname.name.to_s.end_with?(cname.domainname.to_s)
end

Expand Down

0 comments on commit 49e4dad

Please sign in to comment.