Open jbtbnl opened 10 years ago
I've managed to isolate a HTML + JavaScript only app that runs the music app so it looks like the proposed Apache Cordova port is feasible.
One problem did come up: the music app communicates from client to server by means of XMLHTTP requests which are blocked by both client and server when the HTTP origin does not match the HTTP server location. On the client side this can be fixed by disabling web security but this isn't recommended and the ownCloud server still blocks the requests.
@MorrisJobke any idea's how to fix this? I've read somewhere that ownCloud has a remote API but it seems to be undocumented...
CC @Raydiation since he seems to have experience with CORS related issues https://github.com/owncloud/news/blob/master/api/newsapi.php#L91
And the middleware https://github.com/owncloud/news/blob/master/middleware/corsmiddleware.php
Ah, great :) I am wondering if "Origin:null" which I assume Restangular is responsible for could be the reason why ownCloud denies the request?
The Music API is blocking the OPTIONS request for some reason: "Status Code:405 Method Not Allowed" is returned.
The idea is to enable the Music app to be built with Apache Cordova so that we can have an ownCloud Music app on our mobile phones.
Since the Music app uses AngularJS the client side and server side are already separated from each other and communicate by JSON calls. To enable the Cordova app to contact the server we should add a server location, username and password setup. The rest of the (client side) codebase should ideally be the same.