http-headers-verifier 0.0.4 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/http-headers-verifier.rb +3 -3
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76743ca3478ebaab3247738991cf37580206090e6f6f4ad20f21f4a9897ee4eb
|
4
|
+
data.tar.gz: 26ee345ac0a49b3978e8eddebd186af17a1ac58646596819684c92937666067a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7ae58170a355ced08fcbcdf4a5cec9c8321e73a5663d04fd016f635d2f4831773944eb08a91bab8bd0c8a627c6b50b7420e549c08a908bf5a9a12bd74768840
|
7
|
+
data.tar.gz: 9aa131207dc6e6ac18778beb7daaa2264c99aa4513966f7e03169341feebeba6761797fd402a265dac4fa6bbb85986ee2b8d3f80da9dea07247b30e98c49399f
|
@@ -15,15 +15,15 @@ if ARGV.length != 3 && ARGV.length != 2
|
|
15
15
|
exit 2
|
16
16
|
end
|
17
17
|
|
18
|
-
policy_arg, url, verbose = ARGV
|
18
|
+
policy_arg, @url, verbose = ARGV
|
19
19
|
@policies = policy_arg.split(',')
|
20
20
|
|
21
21
|
HttpHeadersUtils.verbose = !verbose.nil?
|
22
22
|
|
23
|
-
actual_headers = Typhoeus.get(url, timeout: HTTP_TIMEOUT_IN_SECONDS, followlocation: true).headers
|
23
|
+
actual_headers = Typhoeus.get(@url, timeout: HTTP_TIMEOUT_IN_SECONDS, followlocation: true).headers
|
24
24
|
|
25
25
|
def verify_headers!(actual_headers, rules)
|
26
|
-
puts "Testing url: #{url}"
|
26
|
+
puts "Testing url: #{@url}"
|
27
27
|
puts "Starting verification of policies #{HttpHeadersUtils.bold(@policies.join(", "))}:"
|
28
28
|
errors = []
|
29
29
|
checked_already = Set.new
|
data/lib/version.rb
CHANGED