Add env variable for session secret

This commit is contained in:
galfert 2019-08-27 15:30:30 +02:00
parent 97ec6ce9bc
commit 53dee63a76
2 changed files with 2 additions and 1 deletions

View File

@ -26,6 +26,7 @@ As usual in Hubot, you can add all config as environment variables.
| `KREDITS_PROVIDER_URL` | Ethereum JSON-RPC URL (default: `http://localhost:7545`) |
| `KREDITS_WEB_URL` | URL of the Kredits Web app (default: `https://kredits.kosmos.org`) |
| `KREDITS_DAO_ADDRESS` | DAO Kernel address |
| `SESSION_SECRET` | Secret used to sign the Session ID |
## Integrations

View File

@ -198,7 +198,7 @@ module.exports = async function(robot, kredits) {
}
};
robot.router.use(session({secret: 'grant'}));
robot.router.use(session({ secret: process.env.SESSION_SECRET || 'grant' }));
robot.router.use('/kredits/signup', grant(grantConfig));
robot.router.get('/kredits/signup/github', async (req, res) => {