stoat.run 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.cjs +6 -1
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -129,8 +129,13 @@ var LocalProxy = class {
|
|
|
129
129
|
try {
|
|
130
130
|
const headers = {};
|
|
131
131
|
for (const [k, v] of Object.entries(meta.headers)) {
|
|
132
|
-
headers[k] = Array.isArray(v) ? v.join(", ") : v;
|
|
132
|
+
headers[k.toLowerCase()] = Array.isArray(v) ? v.join(", ") : v;
|
|
133
133
|
}
|
|
134
|
+
const forwardedHost = headers["host"]?.split(",")[0]?.trim();
|
|
135
|
+
if (forwardedHost) {
|
|
136
|
+
headers["x-forwarded-host"] = forwardedHost;
|
|
137
|
+
}
|
|
138
|
+
headers["x-forwarded-proto"] = "https";
|
|
134
139
|
const { statusCode, headers: resHeaders, body } = await (0, import_undici.request)(url, {
|
|
135
140
|
method: meta.method,
|
|
136
141
|
headers,
|