Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make references to image/ and jsonrpc relative #140

Closed
lozbrown opened this issue Nov 25, 2016 · 3 comments
Closed

Make references to image/ and jsonrpc relative #140

lozbrown opened this issue Nov 25, 2016 · 3 comments

Comments

@lozbrown
Copy link

links to image and jsonrpc start with a leading slash, this makes proxying more complicated.

I think all that is required here is to remove the leading slash when proxying

@lozbrown
Copy link
Author

lozbrown commented Dec 4, 2016

Similar issues have been raised against Chorus 1
jez500/chorus#77
jez500/chorus#78

The above includes this slightly more in depth description:

Using '/jsonrpc' can cause problems if you have a proxy infront of xbmc and it already has a relative URL.

Simply removing the '/' form the front of the jsonrpc url will fix it (and does not break non-proxied access).
The problem is if you already have a relative url (https://mydomain.com/xbmcbox), then /jsonrpc will try to hit https://mydomain.com/jsonrpc (gets 404). If you change it to 'jsonrpc', then it will work correctly and hit https://mydomain.com/xbmcbox/jsonrpc

The issue for images is essentially the same.

I've worked around that slightly in #133 by re-pointing those locations to the kodi webserver as well but its really not good practice becuase it prevents the owner using /images or /jasonrpc for their own things.

@jez500
Copy link
Collaborator

jez500 commented Dec 4, 2016

I'm thinking the best solution for this is to add the ability to override the /jsonrpc and /images paths in the settings page. Would that solve this issue?

@lozbrown
Copy link
Author

lozbrown commented Dec 4, 2016

It would but it seems like an unnecessarily complicated solution for both you as the implementer and for the end users. This should in theory be just a string operation to strip the leading slash from certain uris. in theory this should not break anything else.

The above requires capturing an additional variable in setting and then prepending that to all the above mentioned URIs,, they will probably have to experiment to work out whether they need to add the leading or training slash to those settings items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants