Commit 0f13c380 authored by Sebastien Chopin's avatar Sebastien Chopin

Add https redirect

parent eb10c77e
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
z-index: 1000 !important z-index: 1000 !important
.header .header
background-color #2B8358 background-color #188269
position fixed position fixed
z-index 999 z-index 999
height 55px height 55px
......
export default ({ isDev, req, redirect }) => {
// Redirect to https
if (!isDev && req && !req.connection.encrypted) {
return redirect(301, `https://${req.headers.host}${req.url}`)
}
}
...@@ -16,7 +16,7 @@ module.exports = { ...@@ -16,7 +16,7 @@ module.exports = {
] ]
}, },
loading: { loading: {
color: '#66e8ad' color: '#59cc93'
}, },
manifest: { manifest: {
name: 'Nuxt Hacker News', name: 'Nuxt Hacker News',
...@@ -31,6 +31,9 @@ module.exports = { ...@@ -31,6 +31,9 @@ module.exports = {
'~plugins/vuex-router-sync.js', '~plugins/vuex-router-sync.js',
'~plugins/filters.js' '~plugins/filters.js'
], ],
router: {
middleware: ['https']
},
render: { render: {
static: { static: {
maxAge: '1y', maxAge: '1y',
......
...@@ -1988,8 +1988,8 @@ global@~4.3.0: ...@@ -1988,8 +1988,8 @@ global@~4.3.0:
process "~0.5.1" process "~0.5.1"
globals@^9.0.0: globals@^9.0.0:
version "9.17.0" version "9.18.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.17.0.tgz#0c0ca696d9b9bb694d2e5470bd37777caad50286" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
graceful-fs@^4.1.2, graceful-fs@^4.1.6: graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.11" version "4.1.11"
...@@ -3849,7 +3849,11 @@ rx@^4.1.0: ...@@ -3849,7 +3849,11 @@ rx@^4.1.0:
version "4.1.0" version "4.1.0"
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
safe-buffer@^5.0.1, safe-buffer@~5.0.1: safe-buffer@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.0.tgz#fe4c8460397f9eaaaa58e73be46273408a45e223"
safe-buffer@~5.0.1:
version "5.0.1" version "5.0.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment