fix: add direct support for html sites
This commit is contained in:
@@ -71,11 +71,20 @@ ssh.silicoflare.dev {
|
||||
`
|
||||
|
||||
Object.entries(mappings).map(([key, value]) => {
|
||||
caddyfile += `${key} {
|
||||
if (value.startsWith("/")) {
|
||||
caddyfile += `${key} {
|
||||
root * ${value}
|
||||
file_server
|
||||
}
|
||||
|
||||
`
|
||||
} else {
|
||||
caddyfile += `${key} {
|
||||
reverse_proxy ${value}
|
||||
}
|
||||
|
||||
`
|
||||
}
|
||||
})
|
||||
|
||||
writeFileSync("/etc/caddy/Caddyfile", caddyfile)
|
||||
|
||||
Reference in New Issue
Block a user