Page 1 of 1

CORS or "Access-Control-Allow-Origin" problem

Posted: 31 Jul 2014, 15:26
by martian1530
Hi,
I've been searching around the forum and didn't find anything related to my problem, so I decided to open a new topic.
I've been running Madsonic on a raspberry at home and I have to say I owe You people a huge THANK YOU for writing such a nice piece of software.
Since raspberry is very limited when it comes to computing power, I've decided to write my own, very lightweight web player (maybe I'll share it with you guys, when the time is right 8-) ).
Now... I am hosting the player on the same raspberry. By using the REST API I've been able to access my music and stream it over an encrypted tunnel anywhere. However there is one problem.
When I try to load large data (for example a playlist with over a hundred songs in it, or an album with over hundred songs) Madsonic does not include the "Access-Control-Allow-Origin" HTTP header in the 200 OK response, making the browsers refuse the response. This header is always present in the response when loading smaller amounts of data.
I don't know if this is a bug or a feature... I'm just pointing it out, hoping someone will shed some light on it for me.
Btw, I've tried enabling CORS as described in various tutorials online but with no result. The problem persists.

Thanks in advance for any comments :)

Cheers!

Re: CORS or "Access-Control-Allow-Origin" problem

Posted: 24 Aug 2014, 19:09
by martian1530
Hi,
I've done some research concerning this issue and so far I haven't been able to find any solution for Madsonic.
On the other hand, I found this for Subsonic:
http://sourceforge.net/p/subsonic/bugs/119/

I don't know if this is any help, but it might lead somebody in development to look at the issue :)

Cheers, guys!

Re: CORS or "Access-Control-Allow-Origin" problem

Posted: 25 Aug 2014, 01:05
by Madsonic
hi there,

with latest 5.1 its fixed.

https://github.com/MadMarty/madsonic-se ... va#L59-L61

best regards

Re: CORS or "Access-Control-Allow-Origin" problem

Posted: 26 Aug 2014, 13:01
by martian1530
Awesome, thanks a lot.