However, when visiting https://ins.example.com, it was found that Instagram’s image address is https:// .cdninstagram.com
If you want to reverse proxy this address, and modify the returned image address in ins.example.com
How to configure it?
After trying, I still failed
/docs/rewrite
/docs/redir
Since you want to modify the response body coming back from the upstream server before sending it on to the original client, you want to look into using https://caddyserver.com/docs/http.filter.
You could use it to change all instances of one domain in the response body to another domain instead, such as the CDN domain you want to use.