{"action":"created","issue":{"url":"https://api.github.com/repos/apsavin/bnsf/issues/23","labels_url":"https://api.github.com/repos/apsavin/bnsf/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/apsavin/bnsf/issues/23/comments","events_url":"https://api.github.com/repos/apsavin/bnsf/issues/23/events","html_url":"https://github.com/apsavin/bnsf/issues/23","id":62798849,"number":23,"title":"How can I get cookie for API server","user":{"login":"jifeon","id":384223,"avatar_url":"https://avatars.githubusercontent.com/u/384223?v=3","gravatar_id":"","url":"https://api.github.com/users/jifeon","html_url":"https://github.com/jifeon","followers_url":"https://api.github.com/users/jifeon/followers","following_url":"https://api.github.com/users/jifeon/following{/other_user}","gists_url":"https://api.github.com/users/jifeon/gists{/gist_id}","starred_url":"https://api.github.com/users/jifeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jifeon/subscriptions","organizations_url":"https://api.github.com/users/jifeon/orgs","repos_url":"https://api.github.com/users/jifeon/repos","events_url":"https://api.github.com/users/jifeon/events{/privacy}","received_events_url":"https://api.github.com/users/jifeon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-18T20:58:12Z","updated_at":"2015-04-29T06:23:03Z","closed_at":null,"body":"Cookies for API server are stored inside bnsf, but I want to connect to API server directly by websockets and of course I lose my authorization because I don't have necessary cookies on the client. I remember that I have possibility to write my own controllers in bnsf (I think I can get my cookies this way) but there is no any docs about it. \r\n\r\nI think:\r\n\r\n1. we should pay more attention to this issue and make cookies proxying more configurable\r\n2. need to write some docs about using controllers"},"comment":{"url":"https://api.github.com/repos/apsavin/bnsf/issues/comments/97320667","html_url":"https://github.com/apsavin/bnsf/issues/23#issuecomment-97320667","issue_url":"https://api.github.com/repos/apsavin/bnsf/issues/23","id":97320667,"user":{"login":"jifeon","id":384223,"avatar_url":"https://avatars.githubusercontent.com/u/384223?v=3","gravatar_id":"","url":"https://api.github.com/users/jifeon","html_url":"https://github.com/jifeon","followers_url":"https://api.github.com/users/jifeon/followers","following_url":"https://api.github.com/users/jifeon/following{/other_user}","gists_url":"https://api.github.com/users/jifeon/gists{/gist_id}","starred_url":"https://api.github.com/users/jifeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jifeon/subscriptions","organizations_url":"https://api.github.com/users/jifeon/orgs","repos_url":"https://api.github.com/users/jifeon/repos","events_url":"https://api.github.com/users/jifeon/events{/privacy}","received_events_url":"https://api.github.com/users/jifeon/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T06:23:03Z","updated_at":"2015-04-29T06:23:03Z","body":"Possible solution:\r\n\r\n1. Move cookieStorage out of apiRequester\r\n2. in app-kernel#_writeResponse:\r\n   * get all cookies for all hosts\r\n   * for each host:\r\n      * see if it's subdomain of front host\r\n      * if yes, see if it has some cookies for front host\r\n      * if yes, set send them via set-cookie headers"}}