#fix detecting incorrect login IP by proxy server
RemoteIPInternalProxy 192.168.1.111
RemoteIPHeader X-Forwarded-For
RewriteEngine On
#RewriteRule ^(.*)$ https://HASS/$1 [P]
#RewriteCond %{HTTP:Upgrade} websocket [NC]
#RewriteRule ^/?(.*) "ws://HASS/$1" [P]
RewriteCond %{HTTP:Upgrade} =websocket
RewriteRule /(.*) ws://srv.maicol07.it:8123/$1 [P]
RewriteCond %{HTTP:Upgrade} !=websocket
RewriteRule /(.*) https://HASS/$1 [P]
#Set security on certan areas(some redacted)
<Location "/">
Satisfy any
</Location>
<Location "/api">
Satisfy any
</Location>