|
@@ -13,6 +13,12 @@ class RkService extends CrudService {
|
|
|
}
|
|
|
// 检测,使用key
|
|
|
async urk() {
|
|
|
+ // 针对项目检测.如果检测到project字段,且字段在设置中,则放行
|
|
|
+ const project = _.get(this.ctx, 'request.header.project');
|
|
|
+ if (project) {
|
|
|
+ const projects = this.app.config.projects;
|
|
|
+ if (projects.includes(project)) return;
|
|
|
+ }
|
|
|
const key = _.get(this.ctx, 'request.header.rk');
|
|
|
const keyName = this.getKeyName(key);
|
|
|
const value = await this.redis.get(keyName);
|