I've started a new Sails.js project and want to implement passport-twitter for authentication.
Everything is implemented correctly using the sails-generator-auth module, but after Twitter authorization I get redirected to
http://localhost:9090/auth/twitter/callback
Sails is running behind nginx on localhost:9090 - how can I override the hostname?
So far I tried setting app.set('trust proxy'); in config/env/development.js
http: {
customMiddleware: function(app) {
console.log('trust proxy');
app.enable('trust proxy');
}
},
I see the console.log output when I lift sails, but it doesn't affect the redirection.