Is there a way to add/hook into an [onbeforeOutputToBrowser] kind of filter in Silverstripe, like the onafter filters for writing to the database?
I'm trying to rewrite all references to youtube.com into youtube-nocookie.com to prevent 3rd party cookies from being set. Most of these are oembeds, which are rendered from the SSViewer (I think), at least after the init() or index() functions are called. So I cannot do a str_replace in there. Maybe I could hook into the SSviewer in some way just before output?
Maybe some way to hook into RequestProcessor->setFilters() ?