Remote Address is truncated

So when setting up a reverse proxy with my nginx server that also forwards other sites if i setup a location as /openhab/ and place http://myip.com:8080/openhab/ in to the remote url. The app will load the sites but then the rest calls truncate the “/openhab/” portion of the url so the controls don’t load.

If i modify the nginx site to forward / traffic everything works but this is not the best design as now all base traffic to this reverse proxy will be forwarded to my openhab server.

I think the rest url call formation needs to be fixed to not truncate the location after the port in the remote url.

There has been a request to support this for a long time. It is not trivial to implement and no one has stepped up to do so. What needs to occur is for there to be a flag or an option that allows the server to change the URLs for you before it gets passed to the reverse proxy. Short of that you can create a rule for each and every part of the UIs in NGINX to fix the URLs.

There is no known simple and straight forward way to do this and no one has posted a complete example of how to do it the complicated way.

This shouldn’t be hard. The iOS app should not be doing anything with the address that is placed in as the remote address for the server. I get that is uses both the rest api and the http servers but the base for both of those is the same. Why is it messing with the address and trying to parse things out. It should be a variable as the base address and then the app It should simply pass this address as the server address and add whatever it needs to after the address that is placed in the app line.

Because that really isn’t how it works and fixing it just in the iOS app is not sufficient because any solution needs to work everywhere, Android, iOS, web broswers, etc and for ALL UIs including PaperUI, HABPanel, BasicUI, Habmin, etc…

To paraphrase Kai, “if this were easy it would have been fixed by now.”

https://code.google.com/archive/p/openhab/issues/235