12 lines
368 B
JavaScript
12 lines
368 B
JavaScript
"use strict";
|
|
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);
|
|
}
|