修改系统内部获取token方式

This commit is contained in:
whyour
2022-06-14 22:43:18 +08:00
parent 9f5fb30334
commit 57e7d756cb
9 changed files with 104 additions and 38 deletions
-7
View File
@@ -80,13 +80,6 @@ export default ({ app }: { app: Application }) => {
) {
return next();
}
const remoteAddress = req.socket.remoteAddress;
if (
remoteAddress === '::ffff:127.0.0.1' &&
originPath === '/api/crons/status'
) {
return next();
}
const data = fs.readFileSync(config.authConfigFile, 'utf8');
if (data) {