✨ feat(37回调): 添加大区集中转发接口
This commit is contained in:
13
web-server/config/config.distribute.ts
Normal file
13
web-server/config/config.distribute.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { EggAppConfig, EggAppInfo, PowerPartial } from 'egg';
|
||||
import defaultConfig from './config.default';
|
||||
|
||||
export default (appInfo: EggAppInfo) => {
|
||||
const config = {} as PowerPartial<EggAppConfig>;
|
||||
config.middleware = [ 'parmsDecode', 'getIp', 'proxy' ];
|
||||
|
||||
// the return config will combines to EggAppConfig
|
||||
return {
|
||||
...defaultConfig(appInfo),
|
||||
...config
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user