400: Bad Request error with Unifi Controller

One thing we can try…

Add header_upstream -Authorization to your proxy to the controller.

This will make sure Caddy doesn’t send that header at all, and the controller will therefore have no opportunity to throw a wobbly about it, if that is indeed what’s happening.

1 Like

You, sir, are an absolute genius. Thank you for all of your help.

Adding header_upstream -Authorization under the proxy command solved my issue.

Is there any benefit to adding this line to my other websites as well? any drawbacks to adding it to other sites?

It just stops the header from being sent to the proxied server. It’s negligible. No real benefit or drawback, I’d say, outside of situations like this.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.