Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
HAproxy - Home Assistant - Refresh
« previous
next »
Print
Pages: [
1
]
Author
Topic: HAproxy - Home Assistant - Refresh (Read 4318 times)
bunchofreeds
Full Member
Posts: 203
Karma: 11
HAproxy - Home Assistant - Refresh
«
on:
October 12, 2022, 11:36:08 pm »
Hi,
I have Home Assistant running behind HAproxy on OPNsense successfully.
My issue is that on the first browse to home assistant (opening home assistant in a new browser session), it seems to complete one refresh after about 30 seconds. This returns you to the login screen.
After this it is fine and keeps you logged in.
Opening another tab and logging into Home Assistant after this does not cause the refresh.
The android app works fine.
I've read a bit about possible timeouts and entering extended times into HAproxy.
OPNsense/HAproxy has a web GUI and I'm not sure where to enter these options as the GUI does not seem to match what would be put into HAproxy config.
Home Assistant configuration.yaml has 'use_x_forwarded_for: true' and my OPNsense as trusted.
Has anyone encountered this or have any ideas how to resolve it?
«
Last Edit: October 14, 2022, 02:11:03 am by bunchofreeds
»
Logged
cweakland
Newbie
Posts: 2
Karma: 0
Re: HAproxy - Home Assistant - Refresh
«
Reply #1 on:
December 01, 2022, 05:40:30 pm »
Just found your post, I have the exact same issue on Pfsense w/HAproxy! I don't have a solution but the issue is the same for me.
1. Only in a new browser session (not a tab).
2. I access the main HASS page via haproxy.
3. I can log in or not, but after about 10-12 seconds I get a page reload. This reload comes from a client "get" request to /auth/authorize, and a redirect to https://<mydomain.com>/?auth_callback=1
I cant figure out why the client does this when connected to HASS via HAproxy vs directly to the server.
Logged
mnaim
Jr. Member
Posts: 55
Karma: 5
Re: HAproxy - Home Assistant - Refresh
«
Reply #2 on:
December 06, 2022, 04:19:33 pm »
I have home assistant behing HAproxy too. But what you are describing is happening to me even if go directly in LAN to home assistant server bypassing HAproxy.
Probably issue with home assistant based on:
https://community.home-assistant.io/t/home-assistant-portal-keeps-logging-me-out/430427
https://community.home-assistant.io/t/login-page-over-and-over/83522
https://community.home-assistant.io/t/logged-out-on-each-refresh/112801/5
Logged
cweakland
Newbie
Posts: 2
Karma: 0
Re: HAproxy - Home Assistant - Refresh
«
Reply #3 on:
March 18, 2023, 04:49:14 pm »
I believe I found a fix for you. In HAProxy, do you have a single frontend servicing multiple backends? If so, move your Home Assistant frontend configuration to the top of the list. This seems to work for me.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Web Proxy Filtering and Caching
(Moderator:
fabian
) »
HAproxy - Home Assistant - Refresh