-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Description
I'm having a problem integrating this with my custom Alamofire Manager. I currently construct the Manager like this:
private let manager = Alamofire.Manager(serverTrustPolicyManager: ServerTrustPolicyManager(policies: [
"api.example.com": .PerformDefaultEvaluation(validateHost: true),
"dev.api.example.com": .PerformDefaultEvaluation(validateHost: false),
"staging.api.example.com": .PerformDefaultEvaluation(validateHost: false)
]))and my wildcard SSL certificate hostname verification is ignored on the dev.api and staging.api subdomains.
As soon as I add the configuration to support Timberjack logging to the Manager.init like this:
private let manager = Alamofire.Manager(configuration: Timberjack.defaultSessionConfiguration(), serverTrustPolicyManager: ServerTrustPolicyManager(policies: [
"api.example.com": .PerformDefaultEvaluation(validateHost: true),
"dev.api.example.com": .PerformDefaultEvaluation(validateHost: false),
"staging.api.example.com": .PerformDefaultEvaluation(validateHost: false)
]))the default serverTrustPolicyManager seems to be used, and my SSL handshake with dev.api and staging.api fail, because they don't match the *.example.com SSL certificate hostname. It's like something is overwriting my ServerTrustPolicyManager.
Any ideas?
Reactions are currently unavailable