GitHub(nextgroup2706/ken_nogi)は今後使わず自社Gitea運用に切替え。 NodeSrvは旧リポジトリの履歴を破棄しファイルのみ統合(Dokploy用サービスアカウントは 別途mygit-admin/NodeSrv.gitに履歴あり)。notepmエクスポート(12GB)とPleasanter インストーラzip(208MB)はサイズが大きいため.gitignoreで除外。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
16 lines
450 B
JavaScript
16 lines
450 B
JavaScript
const { readEmails } = require('./allowlistStore');
|
|
|
|
function createAllowlistMiddleware(filePath) {
|
|
return function allowlistMiddleware(req, res, next) {
|
|
const email = (req.headers['x-auth-request-email'] || '').toLowerCase();
|
|
const allowed = readEmails(filePath);
|
|
if (!email || !allowed.includes(email)) {
|
|
res.status(403).send('Forbidden');
|
|
return;
|
|
}
|
|
next();
|
|
};
|
|
}
|
|
|
|
module.exports = { createAllowlistMiddleware };
|