From a6ea7f5d779d1676107247f6c384d3438264c11a Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Sun, 8 Jun 2025 17:25:13 +0800 Subject: [PATCH] chore: vmagent remote write via https, disable http access --- hosts/idols-aquamarine/caddy.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hosts/idols-aquamarine/caddy.nix b/hosts/idols-aquamarine/caddy.nix index 38dccbe6..6166ed1c 100644 --- a/hosts/idols-aquamarine/caddy.nix +++ b/hosts/idols-aquamarine/caddy.nix @@ -81,11 +81,6 @@ in { encode zstd gzip reverse_proxy http://localhost:9090 ''; - # Do not redirect to https for api path - virtualHosts."http://prometheus.writefor.fun/api/v1/write".extraConfig = '' - encode zstd gzip - reverse_proxy http://localhost:9090 - ''; virtualHosts."alertmanager.writefor.fun".extraConfig = '' ${hostCommonConfig} encode zstd gzip @@ -123,6 +118,11 @@ in { } } ''; + # Allow http access for specific api (do not redirect to https) + # virtualHosts."http://xxx.writefor.fun/a/b/c".extraConfig = '' + # encode zstd gzip + # reverse_proxy http://localhost:9090 + # ''; }; networking.firewall.allowedTCPPorts = [80 443];