ken_nogi/NodeSrv/apps/app-portal/src/allowlist.js
Kenichiro NOGI ce58cb4be4 初回コミット: dev配下(NodeSrv/Pleasanter等)をGitea管理下に統合
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>
2026-09-04 15:37:06 +09:00

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 };