router: refactor caddy config to use wildcard cert
This commit is contained in:
parent
574ba8a951
commit
21a058f5ea
@ -60,12 +60,15 @@ in
|
||||
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
|
||||
hash = "sha256-2D7dnG50CwtCho+U+iHmSj2w14zllQXPjmTHr6lJZ/A=";
|
||||
};
|
||||
virtualHosts."grouter.${domain}".extraConfig = ''
|
||||
virtualHosts."*.${domain}".extraConfig = ''
|
||||
encode
|
||||
tls {
|
||||
dns cloudflare {env.CF_API_KEY}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
@grouter host grouter.${domain}
|
||||
handle @grouter {
|
||||
@grafana path /grafana /grafana/*
|
||||
handle @grafana {
|
||||
reverse_proxy localhost:${toString config.services.grafana.settings.server.http_port}
|
||||
@ -80,6 +83,7 @@ in
|
||||
handle /* {
|
||||
reverse_proxy localhost:${toString config.services.glance.settings.server.port}
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user