The reason is that requests are going through a proxy so requests to https://localhost:8000/ are being proxied to http://my.exampledomain.com/ so I don't want http://my.exampledomain.com/ in the markup.
I've had a look around in Director and tried a few things including:
Taking a look at the code it looks like this is hard coded to being absolute. In the Requirements_Backend::path_for_file() class you would need to replace the prefixed value. Patches welcome to make this more accessible.