mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-18 22:15:35 +00:00
Make sure to process headers correctly in blueprint
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user