Browse Source

Trust proxy headers if we're deplpyed on now.sh

keenio
Luke Childs 8 years ago
parent
commit
183eae8537
  1. 5
      index.js

5
index.js

@ -10,6 +10,11 @@ const controllers = require('./controllers');
const app = express(); const app = express();
const port = process.env.port || 3000; const port = process.env.port || 3000;
// Trust proxy headers if we're deployed on now
if(process.env.NOW) {
app.enable('trust proxy');
}
// Analytics // Analytics
app.use(keenMiddleware); app.use(keenMiddleware);

Loading…
Cancel
Save