[GH-ISSUE #1218] Reserve Proxy gives 400 Bad Request on api/websocket #992

Closed
opened 2026-02-26 06:35:20 +03:00 by kerem · 2 comments
Owner

Originally created by @enkama on GitHub (Jul 4, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1218

Hey. I am trying to use Homeassistant with NGINX-Proxy-Manager and Cloudflare.
When entering me Creditentals it all works as it doesnt give me anything in my Homeassistant logs but it throws me a "Unable to connect to Homeassistant" and on F12 I see GET wss://****/api/websocket - Status: 400 - Bad Request / Version: HTTP/1.1. Anyone got an Idea whats going wrong and how I can fix this?
My Config is looking like this and SSL Tab is Certificate from Cloudflare and HTTP/2 is ticked.

grafik

Originally created by @enkama on GitHub (Jul 4, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1218 Hey. I am trying to use Homeassistant with NGINX-Proxy-Manager and Cloudflare. When entering me Creditentals it all works as it doesnt give me anything in my Homeassistant logs but it throws me a "Unable to connect to Homeassistant" and on F12 I see GET wss://****/api/websocket - Status: 400 - Bad Request / Version: HTTP/1.1. Anyone got an Idea whats going wrong and how I can fix this? My Config is looking like this and SSL Tab is Certificate from Cloudflare and HTTP/2 is ticked. ![grafik](https://user-images.githubusercontent.com/37517432/124396291-e6683d00-dd08-11eb-99f4-2b47be8cf1fa.png)
kerem 2026-02-26 06:35:20 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@bigjdunham commented on GitHub (Jul 11, 2021):

I'm having the same issue. I don't get why it's doing it either. Did you figure out why it was happening? Did you get it resolved? What was the solution?

<!-- gh-comment-id:877880963 --> @bigjdunham commented on GitHub (Jul 11, 2021): I'm having the same issue. I don't get why it's doing it either. Did you figure out why it was happening? Did you get it resolved? What was the solution?
Author
Owner

@m0n4 commented on GitHub (Jan 13, 2026):

This issue is probably not on NPM's side.
In order to use reverse proxy, you need to edit Home Assistant’s default configuration to add a trusted_proxies

home assistant configuration.yaml

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 10.0.0.1 # NPM address
<!-- gh-comment-id:3745635590 --> @m0n4 commented on GitHub (Jan 13, 2026): This issue is probably not on NPM's side. In order to use reverse proxy, you need to edit Home Assistant’s default configuration to add a [trusted_proxies](https://www.home-assistant.io/integrations/http/#trusted_proxies) home assistant _configuration.yaml_ ``` http: use_x_forwarded_for: true trusted_proxies: - 10.0.0.1 # NPM address ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#992
No description provided.