Weird situation when using my subdomain to login: "Login attempt failed"

Hi HA community!
I have bought a domain (dsm.mydomain.com) point to my static IP to login my Synology DSM and some other Syno Applications like Driver, Photos, etc. and router fowarded 80, 443 port to my NAS.

I install Hassos in Synology’s Visual Macine Manager, set a subdomain “hass.mydomain.com” in order to saparate from DSM’s main-domain, and using Synology’s Reverse Proxy reversing the “https://hass.mydomain.com” traffic to HA’s IP. 192.168.x.100:8123.

and weird thing happend:
I could login to my Admin accout with my pc, Samsung S9+, both internal URL (http://192.168.x.100:8123) and external URL (https://hass.mydomain.com).

but my GF using her iPhone could only login with internal URL, when using external URL, HA always ban her iPhone,and shows “unable to connet to Home Assistant”. and I will receive a warning:

when using cellular data:
Login attempt or request with invalid authentication from 49.216.xx.xx (49.216.xx.xx). (Mozilla/5.0 (iPhone; CPU iPhone OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/93.0.4577.78 Mobile/15E148 Safari/604.1)

when conneting to WIFI:
Login attempt or request with invalid authentication from Router (192.168.x.1). (Mozilla/5.0 (iPhone; CPU iPhone OS 14_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/93.0.4577.78 Mobile/15E148 Safari/604.1)

Same thing happened on my Mom’s Samsung Phone.

But when I trying to use main-domain “https://dsm.mydomain.com:8123” and set reverse proxy to HA, the weird thing above all gone.

Dose anyone know what’s happend? Why using subdomain always banned specific devices?

thanks for your reading!

In revers proxy setting for HA, did you do hearder rewrite?

You don’t need to type that by hand, just press arrow next to Create and select websocket:
image

That can be one of the issues, but not 100% sure…

Hi! Thanks for replying!
I’ve tried re-create reverse proxy for multiple times, but certain devices still banned by home assistant for some reason, and only happens when accessing HA with port 443.