victronenergy / gui-v2

Other
19 stars 9 forks source link

Redirect user to HTTPS after selecting secured profile #1254

Open jpetrell opened 2 weeks ago

jpetrell commented 2 weeks ago

gui-v2 is adapted for the new security changes in #811. Changing the security profile in General settings reloads the web server. In most cases (secure->weak, weak->secure, secure->unsecure, weak->unsecure) when changing the security profile the browser automatically refreshes and reloads the gui-v2 successfully, but if you are using unsecure HTTP and enable the secured profile a redirect needs to be added.

Tried to implement redirect earlier, but just jumping to the new address failed because the web server hasn't finished reloading: https://github.com/victronenergy/gui-v2/tree/jpetrell/https-redirect

chriadam commented 1 week ago

This is needed for the security work.

jhofstee commented 22 hours ago

https://github.com/victronenergy/gui-v2/commits/jeroen/security-profile/ should fix this. It should reload the page when the security profile changed and check that the webserver is available again.