Toggle organisation restriction from config file.

This commit is contained in:
Simon Vareille
2020-02-15 15:15:15 +01:00
parent f535a197d3
commit b66531d19d
5 changed files with 24 additions and 7 deletions

View File

@@ -41,7 +41,9 @@ module.exports = {
},
publicKey: {
purgeTimeInDays: process.env.PUBLIC_KEY_PURGE_TIME || 30
purgeTimeInDays: process.env.PUBLIC_KEY_PURGE_TIME || 30,
restrictUserOrigin: process.env.RESTRICT_USER_ORIGIN || false,
restrictionRegEx: process.env.RESTRICTION_REGEX
}
};

View File

@@ -22,6 +22,11 @@ module.exports = {
name: 'OpenPGP Key Server',
email: 'user@gmail.com'
}
},
publicKey: {
restrictUserOrigin: true,
restrictionRegEx: '^([a-z0-9\-.]+)@([a-z0-9.\-]*)esisar\.grenoble-inp\.fr$'
}
};