Need some help setting up local media for ChromeCast audio. The issue: local media casts using internal IP instead of public hostname

I have some problems casting local media to a ChromeCast audio. I think I have found out what the issue is, though I could use some help on how to resolve it.

My local media is visible in the HA dashboard, and streaming to e.g. my laptop or phone works great. However when I attempt to cast local media to my ChromeCast audio, HA throws the following error:

[...]
Failed to cast media http://192.168.1.79:8123/media/local/ghostsaxer%20final.wav?authSig=ABCXYZ from internal_url (http://192.168.1.79:8123). Please make sure the URL is: Reachable from the cast device and either a publicly resolvable hostname or an IP address
[...]

Consequently, when I visit this URL on my laptop “nothing” happens. However, when I replace http://192.168.1.79:8123 with https://my-domain.duckdns.org in the URL and visit it through my browser I am able to access the media.

Is it possible to make HA cast local media using my external URL instead of my internal URL? I figured this might solve the issue.

My internal and external URL configuration is as follows:

homeassistant:
  external_url: https://my-domain.duckdns.org:443
  internal_url: http://192.168.1.79:8123

Thanks for reading,

Thijmen

NB: something that came to mind just after posting, might the NGINX Home Assistant SSL proxy play a part in this?

After changing my internal URL such that is is identical to the external URL (https://my-domain.duckdns.org:443) local media is works.

However, I’m not sure if this internal/external URL setup might cause other issues down the road. Could anyone maybe elaborate?