I have a domain registered through Route53 (mydomain.com), and an api gateway endpoint that uses that domain (with subdomain www) to proxy traffic to my home server (running apache/nginx) at keepsecret.ddns.net. This works for simple requests like www.mydomain.com/foo/index.html. However, this setup will often result in redirects. For example, if you go to www.mydomain.com/foo/ then you'll be redirected to keepsecret.ddns.net/foo/index.html.
Is there a way to set something in the AWS console to prevent such redirects (i.e. so that the url always stays on www.mydomain.com and keeps my home IP Address hidden), or is this something I have to handle in my nginx/apache config?