DewGew / DZGA-Flask

Domoticz Google Assisting using Flask
GNU General Public License v3.0
8 stars 4 forks source link

Behind TLS proxy - Requests to http:// #70

Closed rhuijben closed 6 months ago

rhuijben commented 6 months ago

Hi,

I migrated my previous DZGA setup to the new DZGA flask. In that setup I have a virtual host on apache that transparently proxies the requests to DZGA and now DZGA-flask. In the communication with google this works fine but the UI somehow tries to connect to the https location using http and that breaks.

Most likely you can just use '/path' or '//server/path' instead of the protocol here

image

rhuijben commented 6 months ago

When I go to the backing URL it works just fine. It is the public URL that fails.

If I update templates/footer.html to

var flask_server = "{{ request.url_root[:-1] }}".replace('http://', '//');

it works for me. Just '/' doesn't

rhuijben commented 6 months ago

(I deliberately didn't replace https:// as well, as that potentially makes things less secure)