fix: add direct support for html sites

This commit is contained in:
2026-08-04 15:44:30 +05:30
parent 2a93f35d17
commit 030ab22d73
+9
View File
@@ -71,11 +71,20 @@ ssh.silicoflare.dev {
` `
Object.entries(mappings).map(([key, value]) => { Object.entries(mappings).map(([key, value]) => {
if (value.startsWith("/")) {
caddyfile += `${key} {
root * ${value}
file_server
}
`
} else {
caddyfile += `${key} { caddyfile += `${key} {
reverse_proxy ${value} reverse_proxy ${value}
} }
` `
}
}) })
writeFileSync("/etc/caddy/Caddyfile", caddyfile) writeFileSync("/etc/caddy/Caddyfile", caddyfile)