Unifi Android App needs something extra in caddyfile. Have Nginx solution but need Caddy version

I have a working caddyserver setup. However, Unifi (the controller for my network) gives me some issues but only if I try to login via the android app.

People using NGINX have seen similar issues but have solved it by adding(?)/changing it to:

location / {
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header HOST $http_host;
    proxy_pass https://10.0.10.12:8443;
}

My part of the caddyfile:

unifi.mydomain.com {
    proxy / https://192.168.1.41:8443 {
        insecure_skip_verify
        transparent
    }
tls email@mydomain.com
}

Could someone help me with what I should add to the Caddyfile to also get it working? I assume it has something to do with the header(?)

Hi @Tyfoon,

The transparent preset sets the X-Real-IP and Host proxy headers, exactly as your NGINX example does. It additionally sets X-Forwarded-For and X-Forwarded-Proto, which is likely inconsequential.

I think it’s likely something other than the proxy headers is the problem.

https://caddyserver.com/docs/proxy#presets

Any idea how I can further troubleshoot this?

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