Skip to content

Commit

Permalink
feat(webhooks): remove user-agent and accept-encoding headers which t…
Browse files Browse the repository at this point in the history
…he Ruby HTTP library adds by default
  • Loading branch information
bethesque committed Sep 23, 2020
1 parent ecbac9a commit ef25b88
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/pact_broker/domain/webhook_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def execute
def http_request
@http_request ||= begin
req = Net::HTTP.const_get(method.capitalize).new(uri.request_uri)
req.delete("accept-encoding")
req.delete("user-agent")
headers.each_pair { | name, value | req[name] = value }
req.basic_auth(username, password) if username && username.size > 0
req.body = body unless body.nil?
Expand Down

0 comments on commit ef25b88

Please sign in to comment.