mirror of
https://github.com/fosrl/pangolin.git
synced 2025-12-18 05:55:43 +00:00
Make sure to process headers correctly in blueprint
This commit is contained in:
@@ -138,12 +138,8 @@ export async function updateProxyResources(
|
||||
? true
|
||||
: resourceData.ssl;
|
||||
let headers = "";
|
||||
for (const header of resourceData.headers || []) {
|
||||
headers += `${header.name}: ${header.value},`;
|
||||
}
|
||||
// if there are headers, remove the trailing comma
|
||||
if (headers.endsWith(",")) {
|
||||
headers = headers.slice(0, -1);
|
||||
if (resourceData.headers) {
|
||||
headers = JSON.stringify(resourceData.headers);
|
||||
}
|
||||
|
||||
if (existingResource) {
|
||||
|
||||
@@ -15,7 +15,7 @@ export async function addTargets(
|
||||
}:${target.port}`;
|
||||
});
|
||||
|
||||
sendToClient(newtId, {
|
||||
await sendToClient(newtId, {
|
||||
type: `newt/${protocol}/add`,
|
||||
data: {
|
||||
targets: payloadTargets
|
||||
|
||||
Reference in New Issue
Block a user