We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 59f94fb commit 3784e55Copy full SHA for 3784e55
1 file changed
lib/create-app.js
@@ -115,6 +115,14 @@ function createApp (argv = {}) {
115
authProxy(app, argv.authProxy)
116
}
117
118
+ // redirect http to https
119
+ app.use(function (req, res, next) {
120
+ if (req.protocol === 'http:') {
121
+ return res.redirect('https://' + req.headers.host + req.url)
122
+ }
123
+ next()
124
+ })
125
+
126
// Attach the LDP middleware
127
app.use('/', LdpMiddleware(corsSettings))
128
0 commit comments