How to force the TTS service to use the external url?

Hi all,
I’m trying to use the TTS service to play something on the “Google Nest Mini”. However, the cast component is sending the generated MP3 file with the internal URL instead of using the external one.

This is the error I get:

Logger: homeassistant.components.cast.media_player
Source: components/cast/media_player.py:378
Integration: Google Cast (documentation, issues)
First occurred: 10:12:43 AM (1 occurrences)
Last logged: 10:12:43 AM

Failed to cast media http://homeassistant.local:8123/api/tts_proxy/b2497d330613d68d762239fbb0840dbb89ec328f_en_-_tts.google_en_com.mp3 from internal_url (http://homeassistant.local:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address

If I just try to play the MP3 file on my browser, it works.

I’ve tried to force the external URL by specifying it on the configuration.yaml inside the homeassistant section, but that didn’t seem to have made any difference.

homeassistant:
  name: Home
  unit_system: metric
  currency: CAD
  country: CA
  time_zone: "America/Toronto"
  external_url: "https://myha.example.com"
  internal_url: "http://homeassistant.local:8123"

Is there any other detail that I might be missing?

Not sure if this is the right solution, but changing the internal_url to the IP address actually solved the problem. More details.