Accessing /local in casted dashboard fails

When there is something on my Google casted dashboard that tries to access files via /local, it would fail. It doesn’t fail in a regular browser because the browser would add the protocol and host name automatically to such URL, but this doesn’t seem to be the case for casted dashboard. I would have to manually add my server’s hostname to the URL for it to work. This happens to theme background image URL as well as entity_picture in custom button cards. Is this a bug, or did I do something wrong?