Skip to content

Commit 1748000

Browse files
author
Jehoszafat Zimnowoda
committed
fix: saving the headers property of service object
1 parent 79b5e7e commit 1748000

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/otomi-stack.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Debug from 'debug'
55

66
import { emptyDir } from 'fs-extra'
77
import { readFile } from 'fs/promises'
8-
import { cloneDeep, each, filter, get, isEmpty, omit, pick, set } from 'lodash'
8+
import { cloneDeep, each, filter, get, isArray, isEmpty, omit, pick, set } from 'lodash'
99
import generatePassword from 'password-generator'
1010
import { getAppList, getAppSchema, getSpec } from 'src/app'
1111
import Db from 'src/db'
@@ -959,11 +959,13 @@ export default class OtomiStack {
959959
else {
960960
const { cluster, dns } = this.getSettings(['cluster', 'dns'])
961961
const url = getServiceUrl({ domain: svcRaw.domain, name: svcRaw.name, teamId, cluster, dns })
962+
// TODO remove the isArray check in 0.5.24
963+
const headers = isArray(svcRaw.headers) ? undefined : svcRaw.headers
962964
svc.ingress = {
963965
certArn: svcRaw.certArn || undefined,
964966
certName: svcRaw.certName || undefined,
965967
domain: url.domain,
966-
headers: svcRaw.headers || [],
968+
headers,
967969
forwardPath: 'forwardPath' in svcRaw,
968970
hasCert: 'hasCert' in svcRaw,
969971
paths: svcRaw.paths ? svcRaw.paths : [],

0 commit comments

Comments
 (0)