diff --git a/packages/server/src/middleware/apiVersionHandler.ts b/packages/server/src/middleware/apiVersionHandler.ts index 6f58ddadd..28a7c227f 100644 --- a/packages/server/src/middleware/apiVersionHandler.ts +++ b/packages/server/src/middleware/apiVersionHandler.ts @@ -5,7 +5,7 @@ import { ErrorPreconditionFailed } from '../utils/errors'; const compareVersions = require('compare-versions'); export default async function(ctx: AppContext, next: KoaNext): Promise { - if (!isApiRequest(ctx)) return; + if (!isApiRequest(ctx)) return next(); const appVersion = config().appVersion; const minVersion = ctx.headers['x-api-min-version'];