lib/mock/twilio/webhooks/base.rb in mock-twilio-1.3.2 vs lib/mock/twilio/webhooks/base.rb in mock-twilio-1.4
- old
+ new
@@ -24,13 +24,12 @@
def self.auth_twilio
[twilio_client.account_sid, twilio_client.auth_token]
end
def self.headers
- {
- 'X-Forwarded-Proto': Mock::Twilio.proto,
- 'Host': Mock::Twilio.forwarded_host
- }
+ return { 'Host': Mock::Twilio.forwarded_host }.merge!({ 'X-Forwarded-Proto': Mock::Twilio.proto }) if Mock::Twilio.proto == "http"
+
+ { 'Host': Mock::Twilio.forwarded_host }
end
end
end
end
end