We need to temporarily run XDN behind Nginx

Due to an XDN-unrelated contingency we have to run XDN behind our own custom Nginx for a few weeks. We understand that this will significantly decrease the performance of XDN but we prefer to do that rather than maintain two separate code bases. What is the best approach here?

There are a few way to do this but the best way, that has zero impact on your project code, would be to:

  1. Add www.example.com to custom domains in your XDN environment and deploy it.
  2. Update Nginx configuration to forward the traffic to the unique XDN domain name of your environment (you can find it in the Networking tab https://developer.moovweb.com/guides/production#section_network_configuration) and forward the public host header. Something like:
proxy_set_header Host $http_host; # or if you know it's only one host then use www.example.com directly
proxy_pass https://<unique-id>.moovweb-edge.io;

With these two things in place, your XDN project will see the same host header that your users are seeing and will thus generate correctly all the host-relative artifacts that you may have in your application (e.g. HTML content, cookie domains, location header, etc.)