1. The problem I’m having:
Hi all,
I am new to caddy, but I am trying to migrate my external reverse proxy for grafana from nginx proxymanager to caddy.
There is also an internal reverse proxy (traefik) for grafana, so that I can not simply talk to grafana on port 3000, instead of this I have to use a name based hostname.
I can login when I switch the external reverse proxy to caddy, but I got error message from all panels “origin not allowed”
2. Error messages and/or full log output:
“origin not allowed”
3. Caddy version:
v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=
4. How I installed and ran Caddy:
Docker-Compose
version: '3'
services:
caddy:
image: caddy
container_name: caddy
ports:
- "80:80"
- "443:443"
volumes:
- "./data/container-config:/etc/caddy/:z"
- "./data/site:/srv:z"
- "./data/data:/data:z"
- "./data/config:/config:z"
- "./data/logs:/logs:z"
- "/etc/localtime:/etc/localtime:ro"
grafana.external.com {
reverse_proxy grafana.internal {
header_up Host {http.reverse_proxy.upstream.host}
}
}
5. Links to relevant resources:
Getting this working with nginx I had to use something like that:
location / {
proxy_set_header Host domainA;
proxy_set_header Origin https://domainA;
proxy_pass https://domainA;
}
But doing so with caddy (header_up Origin grafana.internal) I am getting a white page with “origin not allowed” and not only from the panels.