{"action":"created","issue":{"url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render/issues/3","repository_url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render","labels_url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render/issues/3/comments","events_url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render/issues/3/events","html_url":"https://github.com/halt-hammerzeit/react-isomorphic-render/issues/3","id":166204787,"number":3,"title":"Feature request - way to set headers in the http client","user":{"login":"adailey14","id":1168689,"avatar_url":"https://avatars.githubusercontent.com/u/1168689?v=3","gravatar_id":"","url":"https://api.github.com/users/adailey14","html_url":"https://github.com/adailey14","followers_url":"https://api.github.com/users/adailey14/followers","following_url":"https://api.github.com/users/adailey14/following{/other_user}","gists_url":"https://api.github.com/users/adailey14/gists{/gist_id}","starred_url":"https://api.github.com/users/adailey14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adailey14/subscriptions","organizations_url":"https://api.github.com/users/adailey14/orgs","repos_url":"https://api.github.com/users/adailey14/repos","events_url":"https://api.github.com/users/adailey14/events{/privacy}","received_events_url":"https://api.github.com/users/adailey14/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-07-18T22:06:01Z","updated_at":"2016-10-31T23:13:36Z","closed_at":"2016-07-18T22:12:09Z","body":"This is a feature request.\n\nGreat work on this project and universal-webpack. I've been trying to migrate a project to use it today.\n\nOne thing I've run into that is stopping me is not having a way to hook into the http client when making api requests in order to add a header, while also having access to cookies server side. \n\nIn our project currently we add an Auth header with a JWT (JSON web token) when making most requests to the api, and this is based on a value stored in a cookie. I can't figure out a way to do that using the react-isomorphic-render page-server currently.\n\nI tried using my own middleware to do the api requests instead of the asynchronous middleware provided by default, but then I am not able to access cookies server side (which you are doing in the asynchronous middleware by passing the clone_request to the http_client).\n\nSo I think the best way to address this is to expand on the http_client api to allow header setting. Maybe just allow any key/value passed into the options hash to set headers on the superagent request?\n\nLet me know what you think!\n"},"comment":{"url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render/issues/comments/257447397","html_url":"https://github.com/halt-hammerzeit/react-isomorphic-render/issues/3#issuecomment-257447397","issue_url":"https://api.github.com/repos/halt-hammerzeit/react-isomorphic-render/issues/3","id":257447397,"user":{"login":"adailey14","id":1168689,"avatar_url":"https://avatars.githubusercontent.com/u/1168689?v=3","gravatar_id":"","url":"https://api.github.com/users/adailey14","html_url":"https://github.com/adailey14","followers_url":"https://api.github.com/users/adailey14/followers","following_url":"https://api.github.com/users/adailey14/following{/other_user}","gists_url":"https://api.github.com/users/adailey14/gists{/gist_id}","starred_url":"https://api.github.com/users/adailey14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adailey14/subscriptions","organizations_url":"https://api.github.com/users/adailey14/orgs","repos_url":"https://api.github.com/users/adailey14/repos","events_url":"https://api.github.com/users/adailey14/events{/privacy}","received_events_url":"https://api.github.com/users/adailey14/received_events","type":"User","site_admin":false},"created_at":"2016-10-31T23:13:36Z","updated_at":"2016-10-31T23:13:36Z","body":"Cool thanks for sharing. I haven't really seen performance issues, because like you said: \"since websites are Single Page Applications nowadays, all subsequent navigation will happen in the user's web browser and the page rendering server won't be involved.\"\r\n\r\nI suspect some of the biggest performance gains with this architecture would come from using a CDN (like amazon cloudfront) to deliver the javascript / css / images instead of serving it from the same server doing the server side rendering. Do you know if there is any clever way to configure that with this project? It's been on my todo list for a while but haven't gotten to it yet."}}
{"actor":{"display_login":"adailey14"}}