diff --git a/hosting/proxy/nginx.prod.conf b/hosting/proxy/nginx.prod.conf index 79007da311..12b8df049f 100644 --- a/hosting/proxy/nginx.prod.conf +++ b/hosting/proxy/nginx.prod.conf @@ -61,7 +61,7 @@ http { set $csp_img "img-src http: https: data: blob:"; set $csp_manifest "manifest-src 'self'"; set $csp_media "media-src 'self' https://js.intercomcdn.com https://cdn.budi.live"; - set $csp_worker "worker-src 'none'"; + set $csp_worker "worker-src blob:"; error_page 502 503 504 /error.html; location = /error.html { diff --git a/lerna.json b/lerna.json index cba15492eb..f0b3f51d47 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "2.26.4", + "version": "2.27.1", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/packages/server/src/sdk/app/rows/sqlAlias.ts b/packages/server/src/sdk/app/rows/sqlAlias.ts index 0fc338ecbe..79d1ff485d 100644 --- a/packages/server/src/sdk/app/rows/sqlAlias.ts +++ b/packages/server/src/sdk/app/rows/sqlAlias.ts @@ -126,16 +126,25 @@ export default class AliasTables { } reverse(rows: T): T { + const mapping = new Map() + const process = (row: Row) => { const final: Row = {} - for (let [key, value] of Object.entries(row)) { - if (!key.includes(".")) { - final[key] = value - } else { - const [alias, column] = key.split(".") - const tableName = this.tableAliases[alias] || alias - final[`${tableName}.${column}`] = value + for (const key of Object.keys(row)) { + let mappedKey = mapping.get(key) + if (!mappedKey) { + const dotLocation = key.indexOf(".") + if (dotLocation === -1) { + mappedKey = key + } else { + const alias = key.slice(0, dotLocation) + const column = key.slice(dotLocation + 1) + const tableName = this.tableAliases[alias] || alias + mappedKey = `${tableName}.${column}` + } + mapping.set(key, mappedKey) } + final[mappedKey] = row[key] } return final }