(placeholders used). However, the protocol for the request is HTTP instead of HTTPS, hence the connection cannot be established. It seems to me that this is the cause for the behavior described above.
Is this desired behavior? Is it a bug? In my understanding, this request should be done over the same protocol as the initial request, namely HTTPS.
This is a bug, if possible open a bug request on github. I’m not sure though, if basicui is part of openhab2 or eclipse smartphone, you would need to find this out.
It is generally not a good idea to make basicui or classicui available for public access. The webserver part is not at the latest version. But you are hopefully securing it with an authorization method at least.
Problem
In the reverse proxy, the SSL connection is terminated, and the request is forwarded to the openhab server via HTTP. However, the fact that the original request was issued via HTTPS is not forwarded.
Consequence: In the openhab server, upon event subscription in org.eclipse.smarthome.io.rest.sitemap.internal.SitemapResource, the injected javax.ws.rs.core.UriInfo assumes the HTTP protocol. Therefore openhab returns an HTTP url for the eventsource.
ProxyPass "/" "http://openhabianpi:8080/"
ProxyPassReverse "/" "http://openhabianpi:8080/"
RequestHeader set X-Forwarded-Proto "https" # <--- make openhab aware of HTTPS
Question
Why does openhab generate complete urls in org.eclipse.smarthome.io.rest.sitemap.internal.SitemapResource rather than only paths? Using paths the web application can assemble the correct event source url. Therefore proxy configuration would be simplified.
This seems to be all of them It would be nice if they were relative. I have the same problem on other apps so it is pretty common. Your RequestHeader directive works great to fix the protcol issue btw…
Very late reply to this chain, but I’m trying to cure the occasional “offline” error when accessing through nginx and this looks like the right place to start.
Am I right to think I end up with a rather clumsy set of nginx location settings like this: