github-pages-health-check 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/github-pages-health-check/domain.rb +14 -10
- data/lib/github-pages-health-check/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76efcdcbad2e6b7545e23d242eaa58e918919cbb
|
|
4
|
+
data.tar.gz: 80eaffe602f27a89b575e572b310e4a0995b88e1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07f7100733a8eca57ca4f53b5308c4afe083dc71612964f56e389da6a5dbe8b14b5aa6b504b70e08e270df05bc9c01c301a7ca9659a1af5c7dd9bc12ee47c0ef
|
|
7
|
+
data.tar.gz: b0a5daeb4e92508814d6ad826e9ca7dcdb3ff20081758fce6ded859aa415db2f9baa37a5c5e5dec21d984097ec4bd09d4d0233c08f90b17d5f756e4b51385879
|
|
@@ -5,11 +5,6 @@ module GitHubPages
|
|
|
5
5
|
class Domain < Checkable
|
|
6
6
|
attr_reader :host
|
|
7
7
|
|
|
8
|
-
GITHUB_DATACENTER_ADDRESSES = %w(
|
|
9
|
-
192.30.252.153
|
|
10
|
-
192.30.252.154
|
|
11
|
-
).freeze
|
|
12
|
-
|
|
13
8
|
LEGACY_IP_ADDRESSES = [
|
|
14
9
|
# Legacy GitHub Datacenter
|
|
15
10
|
"207.97.227.245",
|
|
@@ -68,18 +63,22 @@ module GitHubPages
|
|
|
68
63
|
"43.249.72.133",
|
|
69
64
|
"43.249.73.133",
|
|
70
65
|
"43.249.74.133",
|
|
71
|
-
"43.249.75.133"
|
|
72
|
-
|
|
73
|
-
*GITHUB_DATACENTER_ADDRESSES
|
|
66
|
+
"43.249.75.133"
|
|
74
67
|
].freeze
|
|
75
68
|
|
|
76
|
-
|
|
69
|
+
NEW_PRIMARY_IPS = %w(
|
|
77
70
|
185.199.108.153
|
|
78
71
|
185.199.109.153
|
|
79
72
|
185.199.110.153
|
|
80
73
|
185.199.111.153
|
|
81
74
|
).freeze
|
|
82
75
|
|
|
76
|
+
CURRENT_IP_ADDRESSES = [
|
|
77
|
+
"192.30.252.153",
|
|
78
|
+
"192.30.252.154",
|
|
79
|
+
*NEW_PRIMARY_IPS
|
|
80
|
+
].freeze
|
|
81
|
+
|
|
83
82
|
HASH_METHODS = %i[
|
|
84
83
|
host uri dns_resolves? proxied? cloudflare_ip? fastly_ip?
|
|
85
84
|
old_ip_address? a_record? cname_record? mx_records_present?
|
|
@@ -164,6 +163,11 @@ module GitHubPages
|
|
|
164
163
|
a_record? && CURRENT_IP_ADDRESSES.include?(dns.first.address.to_s)
|
|
165
164
|
end
|
|
166
165
|
|
|
166
|
+
# Is the domain's first response an A record to the new primary IPs?
|
|
167
|
+
def pointed_to_new_primary_ips?
|
|
168
|
+
a_record? && NEW_PRIMARY_IPS.include?(dns.first.address.to_s)
|
|
169
|
+
end
|
|
170
|
+
|
|
167
171
|
# Is the domain's first response a CNAME to a pages domain?
|
|
168
172
|
def cname_to_github_user_domain?
|
|
169
173
|
cname? && !cname_to_pages_dot_github_dot_com? && cname.pages_domain?
|
|
@@ -339,7 +343,7 @@ module GitHubPages
|
|
|
339
343
|
|
|
340
344
|
# Can an HTTPS certificate be issued for this domain?
|
|
341
345
|
def https_eligible?
|
|
342
|
-
(cname_to_github_user_domain? ||
|
|
346
|
+
(cname_to_github_user_domain? || pointed_to_new_primary_ips?) &&
|
|
343
347
|
caa.lets_encrypt_allowed?
|
|
344
348
|
end
|
|
345
349
|
|