Whole page replacement

One of our plugins requires the widget rending pipeline, but we remove the headers and footers of the page so just the content is displayed.  This was done previously using a IHttpFilter and in .net10 we would use some middleware. Can you think of a solution that would work in the new platform? 

Parents
No Data
Reply Children
No Data