migrate chunk to caddy module

Signed-off-by: cy <cy@cy7.sh>
This commit is contained in:
cy 2025-01-27 05:49:00 -05:00
parent a9a3ee8413
commit cad577b193
Signed by: cy
SSH key fingerprint: SHA256:o/geVWV4om1QhUSkKvDQeW/eAihwnjyXkqMwrVdbuts
17 changed files with 91 additions and 103 deletions

View file

@ -30,4 +30,20 @@
name = "git";
};
};
services.caddy.virtualHosts."git.cy7.sh".extraConfig = ''
import common
reverse_proxy localhost:3000
'';
services.caddy.virtualHosts."git.cything.io".extraConfig = ''
import common
# wrap in route so things are evaluated in the order written
route {
# rewrite gitlab URIs to make it work with forgejo
uri path_regexp /-/ /
uri replace /blob/ /src/
redir https://git.cy7.sh{uri} permanent
}
'';
}