TP_Middleware