{"action":"created","issue":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1640","repository_url":"https://api.github.com/repos/nuxt/nuxt.js","labels_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1640/labels{/name}","comments_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1640/comments","events_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1640/events","html_url":"https://github.com/nuxt/nuxt.js/issues/1640","id":256793105,"node_id":"MDU6SXNzdWUyNTY3OTMxMDU=","number":1640,"title":"Server Side context is lost when loading Data from pages or Store","user":{"login":"Norbz","id":6388929,"node_id":"MDQ6VXNlcjYzODg5Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/6388929?v=4","gravatar_id":"","url":"https://api.github.com/users/Norbz","html_url":"https://github.com/Norbz","followers_url":"https://api.github.com/users/Norbz/followers","following_url":"https://api.github.com/users/Norbz/following{/other_user}","gists_url":"https://api.github.com/users/Norbz/gists{/gist_id}","starred_url":"https://api.github.com/users/Norbz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Norbz/subscriptions","organizations_url":"https://api.github.com/users/Norbz/orgs","repos_url":"https://api.github.com/users/Norbz/repos","events_url":"https://api.github.com/users/Norbz/events{/privacy}","received_events_url":"https://api.github.com/users/Norbz/received_events","type":"User","site_admin":false},"labels":[{"id":469223667,"node_id":"MDU6TGFiZWw0NjkyMjM2Njc=","url":"https://api.github.com/repos/nuxt/nuxt.js/labels/type:%20help%20wanted","name":"type: help wanted","color":"128A0C","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-11T18:07:08Z","updated_at":"2018-11-03T15:05:01Z","closed_at":"2017-09-13T12:07:42Z","author_association":"NONE","body":"Im working on a website with language being detected and managed by i18next, and user being managed by a custom session based express middleware.\r\n\r\nLet's say I have my store taking the current User from the req object in nuxtServerInit like that \r\n\r\n`if (req.user)\r\n    commit('setUser', req.user);`\r\n\r\nIt works. Same to get the current language. But now, I need the store to load a configuration JSON depending on the language so I now have in nuxtServerInit:\r\n\r\n`const res = await axios.get(`/api/config/`);\r\n    commit('setConfig', res.data);`\r\n\r\nAnd the language is supposed to be handled by i18n based on session.\r\n\r\nThe call works great.... except that the request made to the server being called by the server itself, it loses it's context based on session. I just cant retrieve any localized content in store or page on SSR for that reason, same for any \"user based\" content.\r\n\r\nI can't find a way to make the session to be \"passed\" we my API is being called by nuxt on server side.\r\n\r\nAnyone have an idea on that ?\n\n<!--cmty--><!--cmty_prevent_hook-->\n<div align=\"right\"><sub><em>This question is available on <a href=\"https://nuxtjs.cmty.io\">Nuxt.js</a> community (<a href=\"https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1466\">#c1466</a>)</em></sub></div>"},"comment":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/comments/435594723","html_url":"https://github.com/nuxt/nuxt.js/issues/1640#issuecomment-435594723","issue_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/1640","id":435594723,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTU5NDcyMw==","user":{"login":"lock[bot]","id":33595554,"node_id":"MDM6Qm90MzM1OTU1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-11-03T15:05:01Z","updated_at":"2018-11-03T15:05:01Z","author_association":"NONE","body":"This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.\n"}}
{"actor":{"display_login":"lock"}}