My site consists of a frontend which is deployed as a Render static site and a backed which is a Render web service. In order to have these at the same domain and not get into CORS issues I use redirects on the static site to send everything that doesn’t match a file to the backend.
This works fine, but I’ve just discovered that the http Host header is set to the onrender.com name, not the name from the original request. Is that expected? Without that I think there’s no way to detect the hostname that the original request came from.
Is there a workaround? I guess I could just do the CORS setup and not use the redirect.