DiUS / pact-consumer-swift

A Swift / ObjeciveC DSL for creating pacts.
MIT License
98 stars 43 forks source link

chore: Allow insecure connections on 127.0.0.1 #118

Closed surpher closed 3 years ago

surpher commented 3 years ago

For some yet-unknown reason URLSessionDelegate isn't called if the baseURL is set to https://localhost. Adding 127.0.0.1 and 0.0.0.0 to the allow list when trying to connect over SSL where provider is exposing its endpoints using a self-signed certificate. This will enable users to actually set up the mockService and .run() the Pact tests against mock-server.

This way mockService can be instantiated with using:

PactVerificationService(url: "https://127.0.0.1", port: 1234, allowInsecureCertificates: true)

This was raised in #114