arjunm009
Posts: 19
Joined: Wed Nov 09, 2016 7:30 pm

MPD Upnp allow request from browser

Sat Oct 07, 2017 1:13 pm

Hey
I have Mpd and Upmpd installed in RPi3.
And I am trying to control the service through a Cordova app and browser.
Is there a way to tell the Upmp server to accept

Code: Select all

Access-Control-Allow-Origin: *
?

At present any control actions sent through XHR or Fetch just returns a 400 Bad request because the browser intercepts the request as a preflight request, since sending control actions to Upnp Mpd server requires you to add the custom header,

Code: Select all

SoapAction
I know there are Node plugins available, but they only work from the terminal. That is not what I am looking for.

Or does anyone have an experience building such an app through javascript? Not the SSDP discovery part just the later, control part.

Return to “Raspberry Pi OS”