{"action":"created","issue":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/475","labels_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/475/comments","events_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/475/events","html_url":"https://github.com/Alamofire/Alamofire/issues/475","id":74768369,"number":475,"title":"iOS 7 headers are not applied","user":{"login":"tosbaha","id":971530,"avatar_url":"https://avatars.githubusercontent.com/u/971530?v=3","gravatar_id":"","url":"https://api.github.com/users/tosbaha","html_url":"https://github.com/tosbaha","followers_url":"https://api.github.com/users/tosbaha/followers","following_url":"https://api.github.com/users/tosbaha/following{/other_user}","gists_url":"https://api.github.com/users/tosbaha/gists{/gist_id}","starred_url":"https://api.github.com/users/tosbaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tosbaha/subscriptions","organizations_url":"https://api.github.com/users/tosbaha/orgs","repos_url":"https://api.github.com/users/tosbaha/repos","events_url":"https://api.github.com/users/tosbaha/events{/privacy}","received_events_url":"https://api.github.com/users/tosbaha/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Alamofire/Alamofire/labels/http%20headers","name":"http headers","color":"69B805"},{"url":"https://api.github.com/repos/Alamofire/Alamofire/labels/needs%20investigation","name":"needs investigation","color":"9559F0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-09T22:05:30Z","updated_at":"2015-05-11T12:55:12Z","closed_at":null,"body":"If Alamofire is used in iOS7 following code doesn't have any effect on iOS7 but it works as expected on iOS 8\r\n```swift\r\nvar defaultCfg: NSURLSessionConfiguration  {\r\n    let cfg = NSURLSessionConfiguration.defaultSessionConfiguration()\r\n    cfg.HTTPCookieStorage = NSHTTPCookieStorage.sharedHTTPCookieStorage()\r\n    cfg.HTTPCookieAcceptPolicy = NSHTTPCookieAcceptPolicy.Always\r\n    cfg.URLCache = nil\r\n    cfg.HTTPAdditionalHeaders = [\"User-Agent\": \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0\", \"Accept-Language\":\"en-US,en;q=0.5\"]\r\n    return cfg\r\n}\r\n\r\nself.manager =   Manager(configuration: defaultCfg) // I am using source directly\r\nself.manager.session.configuration.HTTPAdditionalHeaders![\"Referer\"] = url // No effect on iOS 7\r\n```\r\nOn iOS7 I can't change the session headers after manager is initialized. However on iOS 8 I can change the header before the request anytime I want.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Alamofire/Alamofire/issues/comments/100897822","html_url":"https://github.com/Alamofire/Alamofire/issues/475#issuecomment-100897822","issue_url":"https://api.github.com/repos/Alamofire/Alamofire/issues/475","id":100897822,"user":{"login":"tosbaha","id":971530,"avatar_url":"https://avatars.githubusercontent.com/u/971530?v=3","gravatar_id":"","url":"https://api.github.com/users/tosbaha","html_url":"https://github.com/tosbaha","followers_url":"https://api.github.com/users/tosbaha/followers","following_url":"https://api.github.com/users/tosbaha/following{/other_user}","gists_url":"https://api.github.com/users/tosbaha/gists{/gist_id}","starred_url":"https://api.github.com/users/tosbaha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tosbaha/subscriptions","organizations_url":"https://api.github.com/users/tosbaha/orgs","repos_url":"https://api.github.com/users/tosbaha/repos","events_url":"https://api.github.com/users/tosbaha/events{/privacy}","received_events_url":"https://api.github.com/users/tosbaha/received_events","type":"User","site_admin":false},"created_at":"2015-05-11T12:55:12Z","updated_at":"2015-05-11T12:55:12Z","body":"But initializing manager for each request, defeats the purpose of having manager. Also I think in README it should be noted that on iOS 7, once a manager is initialized, configuration is read-only. I wish you could do some voodoo to make it work for iOS 7 :)"}}