The good news is I figured out a workaround.
You can utilise [server_url]/db.view to update the transcoding command. However, because db.view is restricted, it doesn't work from outside [server_url] - even if you're authenticated.
This is because the required Access-Control-Allow-Origin header doesn't get set. In the file applicationContext-security.xml, this exists:
- Code: Select all
/login.view=IS_AUTHENTICATED_ANONYMOUSLY
/recover.view=IS_AUTHENTICATED_ANONYMOUSLY
/accessDenied.view=IS_AUTHENTICATED_ANONYMOUSLY
/coverArt.view=IS_AUTHENTICATED_ANONYMOUSLY
/captions.view=IS_AUTHENTICATED_ANONYMOUSLY
/hls/**=IS_AUTHENTICATED_ANONYMOUSLY
/segment/**=IS_AUTHENTICATED_ANONYMOUSLY
/stream/**=IS_AUTHENTICATED_ANONYMOUSLY
/ws/**=IS_AUTHENTICATED_ANONYMOUSLY
/share/**=IS_AUTHENTICATED_ANONYMOUSLY
/style/**=IS_AUTHENTICATED_ANONYMOUSLY
/fonts/**=IS_AUTHENTICATED_ANONYMOUSLY
/icons/**=IS_AUTHENTICATED_ANONYMOUSLY
/flash/**=IS_AUTHENTICATED_ANONYMOUSLY
/script/**=IS_AUTHENTICATED_ANONYMOUSLY
/sonos/**=IS_AUTHENTICATED_ANONYMOUSLY
/crossdomain.xml=IS_AUTHENTICATED_ANONYMOUSLY
/personalSettings.view=ROLE_SETTINGS
/passwordSettings.view=ROLE_SETTINGS
/playerSettings.view=ROLE_SETTINGS
/shareSettings.view=ROLE_SETTINGS
/generalSettings.view=ROLE_ADMIN
/advancedSettings.view=ROLE_ADMIN
/userSettings.view=ROLE_ADMIN
/musicFolderSettings.view=ROLE_ADMIN
/networkSettings.view=ROLE_ADMIN
/dlnaSettings.view=ROLE_ADMIN
/sonosSettings.view=ROLE_ADMIN
/transcodingSettings.view=ROLE_ADMIN
/internetRadioSettings.view=ROLE_ADMIN
/podcastSettings.view=ROLE_ADMIN
/db.view=ROLE_ADMIN
/deletePlaylist.view=ROLE_PLAYLIST
/savePlaylist.view=ROLE_PLAYLIST
/download.view=ROLE_DOWNLOAD
/upload.view=ROLE_UPLOAD
/createShare.view=ROLE_SHARE
/changeCoverArt.view=ROLE_COVERART
/editTags.view=ROLE_COVERART
/setMusicFileInfo.view=ROLE_COMMENT
/podcastReceiverAdmin.view=ROLE_PODCAST
/**=IS_AUTHENTICATED_REMEMBERED
If I change /db.view=IS_AUTHENTICATED_ANONYMOUSLY, it works (it errors, but still allows me to run the query).
Of course this option isn't an option because that would result in db.view being completely open.
So I realise this is a really specific and quirky question, but.. is it possible to make the server set a value for Cross-Domain requests in the HTTP headers? Even if it's not *, I would like to be able to set it for a specific domain (or domains) for pages that have the ROLE_ADMIN requirement.
Or, preferably, to be able to send a custom value through the /rest/stream request!
Any ideas or help would be greatly appreciated, as I have no real knowledge of the server architecture.