Execute middleware for only Content type APIs

you can manipulate using:

let { url } = ctx.request
if (url.indexOf('admin') < 0) {
//your logic for API
//asynx next();
}
else{
asynx next();
}

but carefull, you can using “admin” in the API routers

1 Like