Details
Description
We added a new hostname field for use with email templates but we still use the IP as the API endpoint. We need to use the hostname as the API endpoint, but should probably fall back to IP if the hostname is not defined. People upgrading from a version that did not contain the hostname would otherwise stop working.
When using the IP address and Plesk is configured correctly, Plesk will do a 301 redirect to the hostname causing things not to work correctly.