mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-15 16:59:35 +02:00
Fix private resource ssl when applying through blueprints
This commit is contained in:
@@ -235,6 +235,13 @@ export async function updatePrivateResources(
|
|||||||
? false
|
? false
|
||||||
: resourceData.enabled;
|
: resourceData.enabled;
|
||||||
|
|
||||||
|
const resourceSsl =
|
||||||
|
resourceData.mode === "inference" || resourceData.mode === "http"
|
||||||
|
? resourceData.ssl == undefined || resourceData.ssl == null
|
||||||
|
? true
|
||||||
|
: resourceData.ssl
|
||||||
|
: resourceData.ssl;
|
||||||
|
|
||||||
if (existingResource) {
|
if (existingResource) {
|
||||||
let domainInfo:
|
let domainInfo:
|
||||||
| { subdomain: string | null; domainId: string }
|
| { subdomain: string | null; domainId: string }
|
||||||
@@ -286,7 +293,7 @@ export async function updatePrivateResources(
|
|||||||
.set({
|
.set({
|
||||||
name: resourceData.name || resourceNiceId,
|
name: resourceData.name || resourceNiceId,
|
||||||
mode: resourceData.mode,
|
mode: resourceData.mode,
|
||||||
ssl: resourceData.ssl,
|
ssl: resourceSsl,
|
||||||
scheme: resourceData.scheme,
|
scheme: resourceData.scheme,
|
||||||
destination: resourceData.destination,
|
destination: resourceData.destination,
|
||||||
destinationPort: resourceData["destination-port"],
|
destinationPort: resourceData["destination-port"],
|
||||||
@@ -614,7 +621,7 @@ export async function updatePrivateResources(
|
|||||||
defaultNetworkId: network ? network.networkId : null,
|
defaultNetworkId: network ? network.networkId : null,
|
||||||
name: resourceData.name || resourceNiceId,
|
name: resourceData.name || resourceNiceId,
|
||||||
mode: resourceData.mode,
|
mode: resourceData.mode,
|
||||||
ssl: resourceData.ssl,
|
ssl: resourceSsl,
|
||||||
scheme: resourceData.scheme,
|
scheme: resourceData.scheme,
|
||||||
destination: resourceData.destination,
|
destination: resourceData.destination,
|
||||||
destinationPort: resourceData["destination-port"],
|
destinationPort: resourceData["destination-port"],
|
||||||
|
|||||||
Reference in New Issue
Block a user