Skip to content

Commit

Permalink
Remove custom header
Browse files Browse the repository at this point in the history
  • Loading branch information
athackst committed Jul 29, 2023
1 parent fadf433 commit 0c9c32e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions lib/htmlproofer_action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
require 'json'
require 'uri'

# rubocop: disable Layout/LineLength
CHROME_FROZEN_UA = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.0.0 Safari/537.36'
# rubocop: enable Layout/LineLength

# Helper functions to get options from the environment variables
module EnvOptions
# Return the environment variable value from a name or from a list of names (first non-nill)
Expand Down Expand Up @@ -141,9 +137,6 @@ def self.build_options
typhoeus: {
connecttimeout: EnvOptions.get_int('CONNECT_TIMEOUT', 30),
followlocation: EnvOptions.get_bool('FOLLOWLOCATION', true),
headers: {
'User-Agent' => CHROME_FROZEN_UA
},
ssl_verifypeer: EnvOptions.get_bool('SSL_VERIFYPEER', false),
ssl_verifyhost: EnvOptions.get_int('SSL_VERIFYHOST', 0),
timeout: EnvOptions.get_int('TIMEOUT', 120),
Expand Down
1 change: 0 additions & 1 deletion tests/htmlproofer_action_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ def regex_or_substring_match(string, pattern)
expect(result[:hydra][:max_concurrency]).to eq(50)
expect(result[:typhoeus][:connecttimeout]).to eq(30)
expect(result[:typhoeus][:followlocation]).to eq(true)
expect(result[:typhoeus][:headers]).to eq({ 'User-Agent' => CHROME_FROZEN_UA })
expect(result[:typhoeus][:ssl_verifypeer]).to eq(true)
expect(result[:typhoeus][:ssl_verifyhost]).to eq(0)
expect(result[:typhoeus][:timeout]).to eq(120)
Expand Down

0 comments on commit 0c9c32e

Please sign in to comment.