fix: isolate hwlab caddy api route

This commit is contained in:
Codex
2026-06-29 23:08:06 +00:00
parent 5cf5620216
commit ba9a1afc1b
2 changed files with 12 additions and 8 deletions
+10 -6
View File
@@ -985,14 +985,18 @@ export function publicExposureCaddyBlock(exposure: HwlabRuntimePublicExposureSpe
const tlsLines = exposure.caddyTls === "internal" ? " tls internal\n" : "";
const mainBlock = `${exposure.hostname} {
${tlsLines} @api path /health* /v1* /json-rpc* /openapi* /docs* /swagger*
reverse_proxy @api 127.0.0.1:${exposure.apiProxy.remotePort} {
transport http {
response_header_timeout ${exposure.responseHeaderTimeoutSeconds}s
handle @api {
reverse_proxy 127.0.0.1:${exposure.apiProxy.remotePort} {
transport http {
response_header_timeout ${exposure.responseHeaderTimeoutSeconds}s
}
}
}
reverse_proxy 127.0.0.1:${exposure.webProxy.remotePort} {
transport http {
response_header_timeout ${exposure.responseHeaderTimeoutSeconds}s
handle {
reverse_proxy 127.0.0.1:${exposure.webProxy.remotePort} {
transport http {
response_header_timeout ${exposure.responseHeaderTimeoutSeconds}s
}
}
}
}`;