Revert "feat(forwarder): scope upstream forwarder via forwarder_hosts config"

This commit is contained in:
denuitt1
2026-05-10 12:33:23 -07:00
committed by GitHub
parent b13f778cb6
commit c935b87293
6 changed files with 2 additions and 71 deletions
+1 -3
View File
@@ -38,9 +38,7 @@ export default {
}
const upstreamUrl = (env && env.UPSTREAM_FORWARDER_URL) || "";
// f === 1: forward; f === 0: skip; missing: legacy client → forward (compat).
const wantForward = (req.f === 1) || (req.f === undefined);
if (upstreamUrl && wantForward) {
if (upstreamUrl) {
const upstreamResp = await forwardViaUpstream(req, env, upstreamUrl);
if (upstreamResp) return upstreamResp;
// fall through to direct fetch only when fail-mode is open
+1 -3
View File
@@ -105,7 +105,7 @@ function _buildWorkerPayload(req) {
}
}
var out = {
return {
u: req.u,
m: (req.m || "GET").toUpperCase(),
h: headers,
@@ -113,8 +113,6 @@ function _buildWorkerPayload(req) {
ct: req.ct || null,
r: req.r !== false
};
if (typeof req.f === "number") out.f = req.f;
return out;
}
function doGet(e) {