I want to filter output in Apache responses in a complex way.
One way would be ExtFilterDefine from mod_ext_filter, but the script would be called every time for every request, so this would be a large overhead if there are many http requests to be filtered.
Is there any more "simple" and more powerful way to pass the final response output to an external service? I think about a kind of api, maybe itself available by http(s) which could "get" the original response including headers, modifying it and then sending back the "new" response.
I tried to find out myself, but neither ChatGPT nor Bing Copilot gave me answers. They suggested some stuff with Proxy etc., but the proxy itself cannot deliver the response. I need just some kind of filtering hook.
Thanks!