v0.42.2_fix2

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-26 13:06:54 +01:00
1 parent 25148f26eb
commit a75893d428
16 files changed
+301 -66

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
"use strict";
// A local redirect or response terminates in RustProxy and never connects to an
// upstream. Disabled custom locations do not create a live backend dependency.
// Keep these checks aligned with Vhost::validate and config/routing.rs.
function locationRequiresProxy(route) {
return route.enabled !== false
&& !route.response
&& !route.redirect
&& (route.source?.type || "reverse_proxy") === "reverse_proxy";
}
function vhostRequiresProxy(vhost) {
return (vhost.source?.type || "reverse_proxy") === "reverse_proxy"
|| (vhost.routes || []).some(locationRequiresProxy);
}