Strapi Automatic Scaling on Google App Engine

Just for completeness here is my typescript version of the OP’s handler.

import type { Strapi } from "@strapi/strapi";
import type { Context, Next } from "koa";

export default (
    config: Record<string, unknown>,
    { strapi }: { strapi: Strapi }
) => {
    return async (ctx: Context, next: Next) => {
        if (ctx.path === "/_ah/warmup") {
            ctx.send({ success: true }, 200);
        }
        await next();
    };
};