@@ -12,7 +12,6 @@ struct NetworkConfiguration {
1212 static let serverBaseURL : String = Bundle . main. infoDictionary ? [ " API_SERVER_URL " ] as! String
1313 static let serverV1BaseURL : String = serverBaseURL + " /v1 "
1414 static let snuevBaseURL : String = Bundle . main. infoDictionary ? [ " SNUEV_WEB_URL " ] as! String
15- static let apiKey : String = Bundle . main. infoDictionary ? [ " API_KEY " ] as! String
1615
1716 static func getCookie( name: String , value: String ) -> HTTPCookie ? {
1817 return HTTPCookie ( properties: [
@@ -25,11 +24,15 @@ struct NetworkConfiguration {
2524 }
2625
2726 static func getCookiesFrom( accessToken: String ) -> [ HTTPCookie ] {
28- guard let apiKeyCookie = getCookie ( name: " x-access-apikey " , value: NetworkConfiguration . apiKey) ,
29- let tokenCookie = getCookie ( name: " x-access-token " , value: accessToken) ,
30- let deviceTypeCookie = getCookie ( name: " x-os-type " , value: AppMetadata . osType. value ?? " ios " )
27+ guard let tokenCookie = getCookie ( name: " x-access-token " , value: accessToken) ,
28+ let apiKeyCookie = getCookie ( name: AppMetadata . apiKey. key, value: AppMetadata . apiKey. value) ,
29+ let osTypeCookie = getCookie ( name: AppMetadata . osType. key, value: AppMetadata . osType. value) ,
30+ let osVersionCookie = getCookie ( name: AppMetadata . osVersion. key, value: AppMetadata . osVersion. value) ,
31+ let appVersionCookie = getCookie ( name: AppMetadata . appVersion. key, value: AppMetadata . appVersion. value) ,
32+ let appTypeCookie = getCookie ( name: AppMetadata . appType. key, value: AppMetadata . appType. value) ,
33+ let buildNumberCookie = getCookie ( name: AppMetadata . buildNumber. key, value: AppMetadata . buildNumber. value)
3134 else { return [ ] }
3235
33- return [ apiKeyCookie, tokenCookie, deviceTypeCookie ]
36+ return [ apiKeyCookie, tokenCookie, osTypeCookie , osVersionCookie , appVersionCookie , appTypeCookie , buildNumberCookie ]
3437 }
3538}
0 commit comments