diff --git a/packages/plugins/acl/src/server.ts b/packages/plugins/acl/src/server.ts index ce4d515f4..7b19c0e12 100644 --- a/packages/plugins/acl/src/server.ts +++ b/packages/plugins/acl/src/server.ts @@ -268,8 +268,10 @@ export class PluginACL extends Plugin { }); // sync database role data to acl - this.app.on('beforeStart', async () => { - await this.writeRolesToACL(); + this.app.on('afterLoad', async (app, options) => { + if (options.method !== 'install') { + await this.writeRolesToACL(); + } }); this.app.on('beforeInstallPlugin', async (plugin) => { diff --git a/packages/samples/ratelimit/src/server/index.ts b/packages/samples/ratelimit/src/server/index.ts index c9b21dcf3..6b3a083de 100644 --- a/packages/samples/ratelimit/src/server/index.ts +++ b/packages/samples/ratelimit/src/server/index.ts @@ -17,7 +17,7 @@ export class CustomPagePlugin extends Plugin { reset: 'Rate-Limit-Reset', total: 'Rate-Limit-Total', }, - max: 20, + max: 200, disableHeader: false, whitelist: (ctx) => { // some logic that returns a boolean