Inject external provider pool hostname

This commit is contained in:
Davide De Rosa 2019-04-25 21:35:08 +02:00
parent 381668ebed
commit 547c669e81
1 changed files with 5 additions and 0 deletions

View File

@ -38,6 +38,8 @@ public struct InfrastructurePreset: Codable {
case key case key
case wrapKeyData = "wrap.key.data" case wrapKeyData = "wrap.key.data"
case hostname
} }
public enum PresetKeys: String, CodingKey { public enum PresetKeys: String, CodingKey {
@ -119,6 +121,9 @@ public struct InfrastructurePreset: Codable {
} }
} }
} }
if let pattern = external[.hostname] {
sessionBuilder.hostname = pattern.replacingOccurrences(of: "${id}", with: pool.id)
}
configuration.sessionConfiguration = sessionBuilder.build() configuration.sessionConfiguration = sessionBuilder.build()
} }