Migrate Reverse Proxy for Grafana from Nginx Proxymanager to Caddy - Origin not allowed

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:


version: '3'
    image: caddy
    container_name: caddy
      - "80:80"
      - "443:443"
      - "./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.

I think you need to include https:// in your Origin header in Caddy as well.

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