78 points · by benologist · 7y ago · 8 comments
https://userdashboard.github.io/home
The home page did a really good job explaining with images, but wanted to confirm.
module.exports = {
before: async (req) => {
switch (req.host) {
case 'domain1.com':
req.dashboardServer = 'domain1.com'
req.applicationServer = 'http://localhost:7000'
req.applicationServerToken = 'shared secret'
break
}
}
}
This will work with per-site user accounts because the data was already partitioned by the dashboard server address. I think for sharing accounts across multiple websites you could just omit changing the req.dashboardServer.