Assume empty policies to override server settings

Empty != nil. When nil, pull from server.
This commit is contained in:
Davide De Rosa 2019-05-11 14:57:59 +02:00
parent 43c70b2673
commit 5ce49953a0
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ extension TunnelKitProvider {
sessionConfigurationBuilder.httpsProxy = proxy
}
sessionConfigurationBuilder.proxyBypassDomains = providerConfiguration[S.proxyBypassDomains] as? [String]
if let routingPoliciesStrings = providerConfiguration[S.routingPolicies] as? [String], !routingPoliciesStrings.isEmpty {
if let routingPoliciesStrings = providerConfiguration[S.routingPolicies] as? [String] {
sessionConfigurationBuilder.routingPolicies = try routingPoliciesStrings.map {
guard let policy = SessionProxy.RoutingPolicy(rawValue: $0) else {
throw ProviderConfigurationError.parameter(name: "protocolConfiguration.providerConfiguration[\(S.routingPolicies)] has a badly formed element")