Media module browser iframe opens with wrong domain I have a site that is accessible from a subdomain and www. and when accessing from the subdomain the media module's file browser for file uploads/library opens using the wrong domain and so it fails due to security risks for cross domain iframe access. All I get is a white empty box in the modal. On the main site with www. it works fine.

I'm sure this is a fairly common problem, but I'm unable to find anything. 

Anyone able to offer some help?
This ended up being caused by a custom module we had on the site that performed url inbound and outbound alters to direct certain node types, paths etc. to certain domains. All we needed to do was add an exception to the handling for media paths.