try force-ssl again
This commit is contained in:
@@ -24,11 +24,13 @@ server = http.createServer expressApp
|
||||
module.exports = server
|
||||
|
||||
# Force SSL
|
||||
# Set before other routes, as early as possible
|
||||
# if process.env.NODE_ENV=='production'
|
||||
# expressApp.all '*', (req, res, next) ->
|
||||
# if req.headers['x-forwarded-proto']!='https'
|
||||
# res.redirect('https://'+req.headers.host+req.url)
|
||||
Set before other routes, as early as possible
|
||||
if process.env.NODE_ENV=='production'
|
||||
expressApp.get '*', (req, res, next) ->
|
||||
if req.headers['x-forwarded-proto']!='https'
|
||||
res.redirect('https://'+req.headers.host+req.url)
|
||||
else
|
||||
next()
|
||||
|
||||
derby.use(require 'racer-db-mongo')
|
||||
store = derby.createStore
|
||||
|
||||
Reference in New Issue
Block a user