Make sure to process headers correctly in blueprint

This commit is contained in:
Owen
2025-09-21 21:47:36 -04:00
parent 515ecb09e7
commit cb7fa9375b
2 changed files with 3 additions and 7 deletions

View File

@@ -138,12 +138,8 @@ export async function updateProxyResources(
? true ? true
: resourceData.ssl; : resourceData.ssl;
let headers = ""; let headers = "";
for (const header of resourceData.headers || []) { if (resourceData.headers) {
headers += `${header.name}: ${header.value},`; headers = JSON.stringify(resourceData.headers);
}
// if there are headers, remove the trailing comma
if (headers.endsWith(",")) {
headers = headers.slice(0, -1);
} }
if (existingResource) { if (existingResource) {

View File

@@ -15,7 +15,7 @@ export async function addTargets(
}:${target.port}`; }:${target.port}`;
}); });
sendToClient(newtId, { await sendToClient(newtId, {
type: `newt/${protocol}/add`, type: `newt/${protocol}/add`,
data: { data: {
targets: payloadTargets targets: payloadTargets