aadsm / jsmediatags

Media Tags Reader (ID3, MP4, FLAC)
Other
749 stars 128 forks source link

Remote file loading fail. #11

Closed AlexanderMatveev closed 8 years ago

AlexanderMatveev commented 8 years ago

Remote host file loading doesn't work, even from example code. See screenshot below: 2016-03-14 16-48-40

Using with browser JS.

aadsm commented 8 years ago

You need to configure the server to allow cross-domain requests. This is not an issue with this library but it's related to the cross-domain policy that browsers implement.

You can learn more about it here https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS but basically you need to configure the server to present the Access-Control-Allow-Origin header.

AlexanderMatveev commented 8 years ago

@aadsm You mean, to configure remote server, which serves mp3 file? There is no way to do this in my case :(

aadsm commented 8 years ago

Yeah, it's a security feature that browsers provide. You can use a CORS proxy like https://crossorigin.me/ to get around this.