CORS or "Access-Control-Allow-Origin" problem
Posted: 31 Jul 2014, 15:26
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
).
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![Smile :)](./images/smilies/madsonic/002-smile.svg)
Cheers!
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
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!