It's possible in nginx to replace "Host" header in request.
server_name myexample.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host myendpoint.net;
proxy_pass http://127.0.0.1:8111;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
However, is it possible to replace all matches "myendpoint.net" to "myexample.com" both in headers and response body?