In dev mode everything works great, but when on production mode, somehow sails redirects me to https://example.com
Not sure, why. Any ideas?
You need to change the baseUrl
in config/env/production.js
from example.com
to localhost:1337
. When running in production mode, these settings are applied to the sails server.