Pretty sure you could recreate this with an nginx reverse proxy and a little configuration to set the Content-type header dynamically. I don't think any code would be required.
As mentioned, the bandwidth costs and chasing abuse would be the higher effort part.