{"action":"created","issue":{"url":"https://api.github.com/repos/maciejtreder/ng-toolkit/issues/400","repository_url":"https://api.github.com/repos/maciejtreder/ng-toolkit","labels_url":"https://api.github.com/repos/maciejtreder/ng-toolkit/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/maciejtreder/ng-toolkit/issues/400/comments","events_url":"https://api.github.com/repos/maciejtreder/ng-toolkit/issues/400/events","html_url":"https://github.com/maciejtreder/ng-toolkit/issues/400","id":347431182,"node_id":"MDU6SXNzdWUzNDc0MzExODI=","number":400,"title":"How to force https (redirect)?","user":{"login":"mruknowme","id":25130420,"node_id":"MDQ6VXNlcjI1MTMwNDIw","avatar_url":"https://avatars2.githubusercontent.com/u/25130420?v=4","gravatar_id":"","url":"https://api.github.com/users/mruknowme","html_url":"https://github.com/mruknowme","followers_url":"https://api.github.com/users/mruknowme/followers","following_url":"https://api.github.com/users/mruknowme/following{/other_user}","gists_url":"https://api.github.com/users/mruknowme/gists{/gist_id}","starred_url":"https://api.github.com/users/mruknowme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruknowme/subscriptions","organizations_url":"https://api.github.com/users/mruknowme/orgs","repos_url":"https://api.github.com/users/mruknowme/repos","events_url":"https://api.github.com/users/mruknowme/events{/privacy}","received_events_url":"https://api.github.com/users/mruknowme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-03T15:01:21Z","updated_at":"2018-10-07T07:46:55Z","closed_at":null,"author_association":"NONE","body":"How may I force https? The following doesn't work.\r\n\r\n**/local.js**\r\n```js\r\nconst sslRedirect = require('heroku-ssl-redirect');\r\nconst compression = require('compression');\r\n\r\nconst port = process.env.PORT || 8080;\r\n\r\nconst server = require('./dist/server');\r\n\r\nserver.app.use(sslRedirect());\r\n\r\nserver.app.use(compression({ level: 9 }));\r\n\r\nserver.app.use((req, res, next) => {\r\n    if (req.header('x-forwarded-proto') !== 'https') {\r\n        res.redirect(`https://${req.header('host')}${req.url}`);\r\n    }\r\n    else {\r\n        next();\r\n    }\r\n});\r\n\r\nserver.app.listen(port, () => {\r\n    console.log(`Listening on: http://localhost:${port}`);\r\n});\r\n```\r\n\r\nAny suggestings will be much appreciated"},"comment":{"url":"https://api.github.com/repos/maciejtreder/ng-toolkit/issues/comments/427633270","html_url":"https://github.com/maciejtreder/ng-toolkit/issues/400#issuecomment-427633270","issue_url":"https://api.github.com/repos/maciejtreder/ng-toolkit/issues/400","id":427633270,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzYzMzI3MA==","user":{"login":"DESHU44","id":6917620,"node_id":"MDQ6VXNlcjY5MTc2MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/6917620?v=4","gravatar_id":"","url":"https://api.github.com/users/DESHU44","html_url":"https://github.com/DESHU44","followers_url":"https://api.github.com/users/DESHU44/followers","following_url":"https://api.github.com/users/DESHU44/following{/other_user}","gists_url":"https://api.github.com/users/DESHU44/gists{/gist_id}","starred_url":"https://api.github.com/users/DESHU44/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DESHU44/subscriptions","organizations_url":"https://api.github.com/users/DESHU44/orgs","repos_url":"https://api.github.com/users/DESHU44/repos","events_url":"https://api.github.com/users/DESHU44/events{/privacy}","received_events_url":"https://api.github.com/users/DESHU44/received_events","type":"User","site_admin":false},"created_at":"2018-10-07T07:46:55Z","updated_at":"2018-10-07T07:46:55Z","author_association":"NONE","body":"hey @mruknowme, Did you find the solution..?"}}
{"actor":{"display_login":"DESHU44"}}