Esphome web ui black screen behind proxy

I have just installed ESPhome and found out that when I try to communicate with my first ESP32 it only shows a blank black window. This is when I access HA via my proxy (which also handles the HTTPS). But when I connect to my HA installation directly (via HTTP) it does work.

Anybody else have this problem, and maybe has been able to resolve it?

OK have found the fix. It seems I missed a configuration in my Apache proxy config.

The follow config was missing:
ProxyPreserveHost On

Once I added this and reloaded Apache the ESPhome window got populated.