Hey @Farhan_Shaikh,
If I’m correct you can’t specify it for admin or api.
But you could check for the admin object in ctx.state, something like this:
module.exports = strapi => {
return {
// can also be async
initialize() {
strapi.app.use(async (ctx, next) => {
if(!ctx.state.admin) {
// await someAsyncCode()
}
await next();
// await someAsyncCode()
});
},
};
};
Hope this helps! 