Module: ApiTester::ServerInformation
- Defined in:
- lib/api-tester/modules/server_information.rb
Overview
Module for ensuring the server isn’t broadcasting information about itself
Class Method Summary collapse
Class Method Details
.go(contract) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/api-tester/modules/server_information.rb', line 6 def self.go(contract) reports = [] endpoint = contract.endpoints[0] response = endpoint.default_call contract.base_url %i[server x_powered_by x_aspnetmvc_version x_aspnet_version].each do |key| if response.headers[key] reports << ServerBroadcastReport.new(response.headers[key], key) end end reports end |
.order ⇒ Object
21 22 23 |
# File 'lib/api-tester/modules/server_information.rb', line 21 def self.order 10 end |