Trusted_host_patterns not working with domain
Figured this one out after some trial and error. I don't know if it is necessary due to some server settings I have, but I fixed this by adding the private IP of my server to the trusted host names setting. I'm uncertain as to why this is necessary since all the other examples I've seen don't need any reference to the private IP, but in my case it seems to be needed.