Upon sending requests to the dockerized Django app through the API gateway layer using the container name (svc_payment_dev), I faced an issue indicating that the domain name provided is not valid acoarding to RFC 1034/1035
I know that underscores are typically not allowed in hostnames, and unfortunately, I’m unable to modify the container name at this time.So. I’m currently seeking a solution to modify the validation hostname in Django.
Also, I’ve added the hostname to ALLOWED_HOSTS list but still encounter the “invalid hostname” error.
ALLOWED_HOSTS = [
'svc_payment_dev:8000'
]