From d9ead48c598d7a062a31fdfbe2cd4adddf16e7de Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Fri, 18 Feb 2022 17:36:23 +0000 Subject: [PATCH 1/7] Deprovision and local couch db url fix --- packages/backend-core/src/context/deprovision.js | 4 ++-- packages/backend-core/src/migrations/index.js | 1 + packages/server/scripts/dev/manage.js | 2 +- packages/server/src/db/client.js | 2 +- packages/worker/scripts/dev/manage.js | 2 +- packages/worker/src/db/index.js | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/backend-core/src/context/deprovision.js b/packages/backend-core/src/context/deprovision.js index 1fbc2c8398..9f89dbbfa9 100644 --- a/packages/backend-core/src/context/deprovision.js +++ b/packages/backend-core/src/context/deprovision.js @@ -1,5 +1,5 @@ const { getGlobalUserParams, getAllApps } = require("../db/utils") -const { getDB, getCouch } = require("../db") +const { getDB } = require("../db") const { getGlobalDB } = require("../tenancy") const { StaticDatabases } = require("../db/constants") @@ -79,7 +79,7 @@ const removeGlobalDB = async tenantId => { const removeTenantApps = async tenantId => { try { - const apps = await getAllApps(getCouch(), { all: true }) + const apps = await getAllApps({ all: true }) const destroyPromises = apps.map(app => getDB(app.appId).destroy()) await Promise.allSettled(destroyPromises) } catch (err) { diff --git a/packages/backend-core/src/migrations/index.js b/packages/backend-core/src/migrations/index.js index e2ed75d407..94ce6c78be 100644 --- a/packages/backend-core/src/migrations/index.js +++ b/packages/backend-core/src/migrations/index.js @@ -22,6 +22,7 @@ exports.getMigrationsDoc = async db => { if (err.status && err.status === 404) { return { _id: DocumentTypes.MIGRATIONS } } + console.error(err) } } diff --git a/packages/server/scripts/dev/manage.js b/packages/server/scripts/dev/manage.js index 77a09a4820..46a221ca33 100644 --- a/packages/server/scripts/dev/manage.js +++ b/packages/server/scripts/dev/manage.js @@ -37,7 +37,7 @@ async function init() { const envFileJson = { PORT: 4001, MINIO_URL: "http://localhost:4004", - COUCH_DB_URL: "http://budibase:budibase@localhost:10000/db/", + COUCH_DB_URL: "http://budibase:budibase@localhost:4005", REDIS_URL: "localhost:6379", WORKER_URL: "http://localhost:4002", INTERNAL_API_KEY: "budibase", diff --git a/packages/server/src/db/client.js b/packages/server/src/db/client.js index 5d0df7ef05..9e90163fff 100644 --- a/packages/server/src/db/client.js +++ b/packages/server/src/db/client.js @@ -5,7 +5,7 @@ const allDbs = require("pouchdb-all-dbs") const find = require("pouchdb-find") const env = require("../environment") -const COUCH_DB_URL = getCouchUrl() || "http://localhost:10000/db/" +const COUCH_DB_URL = getCouchUrl() || "http://localhost:4005" PouchDB.plugin(replicationStream.plugin) PouchDB.plugin(find) diff --git a/packages/worker/scripts/dev/manage.js b/packages/worker/scripts/dev/manage.js index 34a2b7da06..bb7e41ce87 100644 --- a/packages/worker/scripts/dev/manage.js +++ b/packages/worker/scripts/dev/manage.js @@ -16,7 +16,7 @@ async function init() { REDIS_URL: "localhost:6379", REDIS_PASSWORD: "budibase", MINIO_URL: "http://localhost:4004", - COUCH_DB_URL: "http://budibase:budibase@localhost:10000/db/", + COUCH_DB_URL: "http://budibase:budibase@localhost:4005", COUCH_DB_USERNAME: "budibase", COUCH_DB_PASSWORD: "budibase", // empty string is false diff --git a/packages/worker/src/db/index.js b/packages/worker/src/db/index.js index d7e7f5ff4f..770aabd95b 100644 --- a/packages/worker/src/db/index.js +++ b/packages/worker/src/db/index.js @@ -4,7 +4,7 @@ const env = require("../environment") const { getCouchUrl } = require("@budibase/backend-core/db") // level option is purely for testing (development) -const COUCH_DB_URL = getCouchUrl() || "http://localhost:10000/db/" +const COUCH_DB_URL = getCouchUrl() || "http://localhost:4005" let POUCH_DB_DEFAULTS = { prefix: COUCH_DB_URL, From 2e2ffc138a44d0b416f368a1f60b785db4e2d048 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Fri, 18 Feb 2022 17:45:29 +0000 Subject: [PATCH 2/7] v1.0.69 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lerna.json b/lerna.json index 170748e1de..cc5becd1a7 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.68", + "version": "1.0.69", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index c2d641b296..5b92369949 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.68", + "version": "1.0.69", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index f7a4ad71f0..4383366e11 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.68", + "version": "1.0.69", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index 7670b8aa23..f52af34a62 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.68", + "version": "1.0.69", "license": "GPL-3.0", "private": true, "scripts": { @@ -64,10 +64,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.68", - "@budibase/client": "^1.0.68", - "@budibase/frontend-core": "^1.0.68", - "@budibase/string-templates": "^1.0.68", + "@budibase/bbui": "^1.0.69", + "@budibase/client": "^1.0.69", + "@budibase/frontend-core": "^1.0.69", + "@budibase/string-templates": "^1.0.69", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 75938563e1..88af98da01 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.68", + "version": "1.0.69", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index 8a56dcaefd..a463456d80 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.68", + "version": "1.0.69", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.68", - "@budibase/frontend-core": "^1.0.68", - "@budibase/string-templates": "^1.0.68", + "@budibase/bbui": "^1.0.69", + "@budibase/frontend-core": "^1.0.69", + "@budibase/string-templates": "^1.0.69", "regexparam": "^1.3.0", "rollup-plugin-polyfill-node": "^0.8.0", "shortid": "^2.2.15", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index f74d88f170..28d2fdfc47 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.68", + "version": "1.0.69", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.68", + "@budibase/bbui": "^1.0.69", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index bd48431b62..5385beb88b 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.68", + "version": "1.0.69", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -73,9 +73,9 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.68", - "@budibase/client": "^1.0.68", - "@budibase/string-templates": "^1.0.68", + "@budibase/backend-core": "^1.0.69", + "@budibase/client": "^1.0.69", + "@budibase/string-templates": "^1.0.69", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 717fe18e75..d4a46aca8b 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.68", + "version": "1.0.69", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 3da69031c2..5859052418 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.68", + "version": "1.0.69", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -34,8 +34,8 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.68", - "@budibase/string-templates": "^1.0.68", + "@budibase/backend-core": "^1.0.69", + "@budibase/string-templates": "^1.0.69", "@koa/router": "^8.0.0", "@sentry/node": "^6.0.0", "@techpass/passport-openidconnect": "^0.3.0", From 9aa799e46546105516cf9df0a01243c46f18b764 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 20 Feb 2022 22:20:52 +0100 Subject: [PATCH 3/7] fix k8s by adding google config to values --- charts/budibase/Chart.yaml | 2 +- charts/budibase/values.yaml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/budibase/Chart.yaml b/charts/budibase/Chart.yaml index 16ceadc00e..daf8dad635 100644 --- a/charts/budibase/Chart.yaml +++ b/charts/budibase/Chart.yaml @@ -11,7 +11,7 @@ sources: - https://github.com/Budibase/budibase - https://budibase.com type: application -version: 0.2.7 +version: 0.2.8 appVersion: 1.0.48 dependencies: - name: couchdb diff --git a/charts/budibase/values.yaml b/charts/budibase/values.yaml index 81c8193bd2..648b1d2dee 100644 --- a/charts/budibase/values.yaml +++ b/charts/budibase/values.yaml @@ -100,6 +100,9 @@ globals: cookieDomain: "" platformUrl: "" httpMigrations: "0" + google: + clientId: "" + secret: "" createSecrets: true # creates an internal API key, JWT secrets and redis password for you From e91697a037b3af09bbb7154b0b19bcfe56520812 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Sun, 20 Feb 2022 21:32:17 +0000 Subject: [PATCH 4/7] v1.0.70 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lerna.json b/lerna.json index cc5becd1a7..67ff53a65a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.69", + "version": "1.0.70", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 5b92369949..1851cb76be 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.69", + "version": "1.0.70", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 4383366e11..916b6956c9 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.69", + "version": "1.0.70", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index f52af34a62..593b7cab0f 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.69", + "version": "1.0.70", "license": "GPL-3.0", "private": true, "scripts": { @@ -64,10 +64,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.69", - "@budibase/client": "^1.0.69", - "@budibase/frontend-core": "^1.0.69", - "@budibase/string-templates": "^1.0.69", + "@budibase/bbui": "^1.0.70", + "@budibase/client": "^1.0.70", + "@budibase/frontend-core": "^1.0.70", + "@budibase/string-templates": "^1.0.70", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index 88af98da01..aaff4bf61d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.69", + "version": "1.0.70", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index a463456d80..da02a07f67 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.69", + "version": "1.0.70", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.69", - "@budibase/frontend-core": "^1.0.69", - "@budibase/string-templates": "^1.0.69", + "@budibase/bbui": "^1.0.70", + "@budibase/frontend-core": "^1.0.70", + "@budibase/string-templates": "^1.0.70", "regexparam": "^1.3.0", "rollup-plugin-polyfill-node": "^0.8.0", "shortid": "^2.2.15", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index 28d2fdfc47..d4d29c01f8 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.69", + "version": "1.0.70", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.69", + "@budibase/bbui": "^1.0.70", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 5385beb88b..117b615b02 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.69", + "version": "1.0.70", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -73,9 +73,9 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.69", - "@budibase/client": "^1.0.69", - "@budibase/string-templates": "^1.0.69", + "@budibase/backend-core": "^1.0.70", + "@budibase/client": "^1.0.70", + "@budibase/string-templates": "^1.0.70", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index d4a46aca8b..f0e7b30832 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.69", + "version": "1.0.70", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index 5859052418..ac31615260 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.69", + "version": "1.0.70", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -34,8 +34,8 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.69", - "@budibase/string-templates": "^1.0.69", + "@budibase/backend-core": "^1.0.70", + "@budibase/string-templates": "^1.0.70", "@koa/router": "^8.0.0", "@sentry/node": "^6.0.0", "@techpass/passport-openidconnect": "^0.3.0", From 0bf65376c3ca409653ef99a7665f656220e657c4 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 21 Feb 2022 10:22:26 +0000 Subject: [PATCH 5/7] Forward Host header to worker and server through NGINX --- hosting/nginx.dev.conf.hbs | 6 ++++++ hosting/nginx.prod.conf.hbs | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 2bf5c0e4b6..028d9c58ea 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -34,6 +34,7 @@ http { location ~ ^/api/(system|admin|global)/ { proxy_pass http://{{ address }}:4002; + proxy_set_header Host $host; } location /api/ { @@ -41,24 +42,29 @@ http { proxy_connect_timeout 120s; proxy_send_timeout 120s; proxy_pass http://{{ address }}:4001; + proxy_set_header Host $host; } location = / { proxy_pass http://{{ address }}:4001; + proxy_set_header Host $host; } location /app_ { proxy_pass http://{{ address }}:4001; + proxy_set_header Host $host; } location /app/ { proxy_pass http://{{ address }}:4001; rewrite ^/app/(.*)$ /$1 break; + proxy_set_header Host $host; } location /builder { proxy_pass http://{{ address }}:3000; rewrite ^/builder(.*)$ /builder/$1 break; + proxy_set_header Host $host; } location /builder/ { diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index 56ea7d2171..02ff9f0c7b 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -68,10 +68,12 @@ http { location /app { proxy_pass http://$apps:4002; rewrite ^/app/(.*)$ /$1 break; + proxy_set_header Host $host; } location = / { proxy_pass http://$apps:4002; + proxy_set_header Host $host; } {{#if watchtower}} @@ -87,15 +89,18 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$apps:4002; + proxy_set_header Host $host; } location ~ ^/api/(system|admin|global)/ { proxy_pass http://$worker:4003; + proxy_set_header Host $host; } location /worker/ { proxy_pass http://$worker:4003; rewrite ^/worker/(.*)$ /$1 break; + proxy_set_header Host $host; } location /api/ { From ecd1bb2f465c4993ef4bd377c6688bf1dc193fd2 Mon Sep 17 00:00:00 2001 From: Budibase Release Bot <> Date: Mon, 21 Feb 2022 10:46:11 +0000 Subject: [PATCH 6/7] v1.0.71 --- lerna.json | 2 +- packages/backend-core/package.json | 2 +- packages/bbui/package.json | 2 +- packages/builder/package.json | 10 +++++----- packages/cli/package.json | 2 +- packages/client/package.json | 8 ++++---- packages/frontend-core/package.json | 4 ++-- packages/server/package.json | 8 ++++---- packages/string-templates/package.json | 2 +- packages/worker/package.json | 6 +++--- 10 files changed, 23 insertions(+), 23 deletions(-) diff --git a/lerna.json b/lerna.json index 67ff53a65a..bde0c98c9a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.0.70", + "version": "1.0.71", "npmClient": "yarn", "packages": [ "packages/*" diff --git a/packages/backend-core/package.json b/packages/backend-core/package.json index 1851cb76be..0210b33752 100644 --- a/packages/backend-core/package.json +++ b/packages/backend-core/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/backend-core", - "version": "1.0.70", + "version": "1.0.71", "description": "Budibase backend core libraries used in server and worker", "main": "src/index.js", "author": "Budibase", diff --git a/packages/bbui/package.json b/packages/bbui/package.json index 916b6956c9..32039c3358 100644 --- a/packages/bbui/package.json +++ b/packages/bbui/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/bbui", "description": "A UI solution used in the different Budibase projects.", - "version": "1.0.70", + "version": "1.0.71", "license": "MPL-2.0", "svelte": "src/index.js", "module": "dist/bbui.es.js", diff --git a/packages/builder/package.json b/packages/builder/package.json index 593b7cab0f..a123c2a630 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/builder", - "version": "1.0.70", + "version": "1.0.71", "license": "GPL-3.0", "private": true, "scripts": { @@ -64,10 +64,10 @@ } }, "dependencies": { - "@budibase/bbui": "^1.0.70", - "@budibase/client": "^1.0.70", - "@budibase/frontend-core": "^1.0.70", - "@budibase/string-templates": "^1.0.70", + "@budibase/bbui": "^1.0.71", + "@budibase/client": "^1.0.71", + "@budibase/frontend-core": "^1.0.71", + "@budibase/string-templates": "^1.0.71", "@sentry/browser": "5.19.1", "@spectrum-css/page": "^3.0.1", "@spectrum-css/vars": "^3.0.1", diff --git a/packages/cli/package.json b/packages/cli/package.json index aaff4bf61d..a57d77d56e 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/cli", - "version": "1.0.70", + "version": "1.0.71", "description": "Budibase CLI, for developers, self hosting and migrations.", "main": "src/index.js", "bin": { diff --git a/packages/client/package.json b/packages/client/package.json index da02a07f67..8ac527a451 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/client", - "version": "1.0.70", + "version": "1.0.71", "license": "MPL-2.0", "module": "dist/budibase-client.js", "main": "dist/budibase-client.js", @@ -19,9 +19,9 @@ "dev:builder": "rollup -cw" }, "dependencies": { - "@budibase/bbui": "^1.0.70", - "@budibase/frontend-core": "^1.0.70", - "@budibase/string-templates": "^1.0.70", + "@budibase/bbui": "^1.0.71", + "@budibase/frontend-core": "^1.0.71", + "@budibase/string-templates": "^1.0.71", "regexparam": "^1.3.0", "rollup-plugin-polyfill-node": "^0.8.0", "shortid": "^2.2.15", diff --git a/packages/frontend-core/package.json b/packages/frontend-core/package.json index d4d29c01f8..af70920442 100644 --- a/packages/frontend-core/package.json +++ b/packages/frontend-core/package.json @@ -1,12 +1,12 @@ { "name": "@budibase/frontend-core", - "version": "1.0.70", + "version": "1.0.71", "description": "Budibase frontend core libraries used in builder and client", "author": "Budibase", "license": "MPL-2.0", "svelte": "src/index.js", "dependencies": { - "@budibase/bbui": "^1.0.70", + "@budibase/bbui": "^1.0.71", "lodash": "^4.17.21", "svelte": "^3.46.2" } diff --git a/packages/server/package.json b/packages/server/package.json index 117b615b02..9bff5a6998 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/server", "email": "hi@budibase.com", - "version": "1.0.70", + "version": "1.0.71", "description": "Budibase Web Server", "main": "src/index.ts", "repository": { @@ -73,9 +73,9 @@ "license": "GPL-3.0", "dependencies": { "@apidevtools/swagger-parser": "^10.0.3", - "@budibase/backend-core": "^1.0.70", - "@budibase/client": "^1.0.70", - "@budibase/string-templates": "^1.0.70", + "@budibase/backend-core": "^1.0.71", + "@budibase/client": "^1.0.71", + "@budibase/string-templates": "^1.0.71", "@bull-board/api": "^3.7.0", "@bull-board/koa": "^3.7.0", "@elastic/elasticsearch": "7.10.0", diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index f0e7b30832..7d7c332013 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -1,6 +1,6 @@ { "name": "@budibase/string-templates", - "version": "1.0.70", + "version": "1.0.71", "description": "Handlebars wrapper for Budibase templating.", "main": "src/index.cjs", "module": "dist/bundle.mjs", diff --git a/packages/worker/package.json b/packages/worker/package.json index ac31615260..82cb496fee 100644 --- a/packages/worker/package.json +++ b/packages/worker/package.json @@ -1,7 +1,7 @@ { "name": "@budibase/worker", "email": "hi@budibase.com", - "version": "1.0.70", + "version": "1.0.71", "description": "Budibase background service", "main": "src/index.ts", "repository": { @@ -34,8 +34,8 @@ "author": "Budibase", "license": "GPL-3.0", "dependencies": { - "@budibase/backend-core": "^1.0.70", - "@budibase/string-templates": "^1.0.70", + "@budibase/backend-core": "^1.0.71", + "@budibase/string-templates": "^1.0.71", "@koa/router": "^8.0.0", "@sentry/node": "^6.0.0", "@techpass/passport-openidconnect": "^0.3.0", From 3ee7997daea49dcbef4286d36d7d0cbaaadf9220 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Mon, 21 Feb 2022 10:46:45 +0000 Subject: [PATCH 7/7] Replace location specific with global http host rule --- hosting/nginx.dev.conf.hbs | 9 +-------- hosting/nginx.prod.conf.hbs | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/hosting/nginx.dev.conf.hbs b/hosting/nginx.dev.conf.hbs index 028d9c58ea..624b4c2653 100644 --- a/hosting/nginx.dev.conf.hbs +++ b/hosting/nginx.dev.conf.hbs @@ -11,6 +11,7 @@ events { http { include /etc/nginx/mime.types; default_type application/octet-stream; + proxy_set_header Host $host; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' @@ -34,7 +35,6 @@ http { location ~ ^/api/(system|admin|global)/ { proxy_pass http://{{ address }}:4002; - proxy_set_header Host $host; } location /api/ { @@ -42,29 +42,24 @@ http { proxy_connect_timeout 120s; proxy_send_timeout 120s; proxy_pass http://{{ address }}:4001; - proxy_set_header Host $host; } location = / { proxy_pass http://{{ address }}:4001; - proxy_set_header Host $host; } location /app_ { proxy_pass http://{{ address }}:4001; - proxy_set_header Host $host; } location /app/ { proxy_pass http://{{ address }}:4001; rewrite ^/app/(.*)$ /$1 break; - proxy_set_header Host $host; } location /builder { proxy_pass http://{{ address }}:3000; rewrite ^/builder(.*)$ /builder/$1 break; - proxy_set_header Host $host; } location /builder/ { @@ -73,7 +68,6 @@ http { proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } @@ -82,7 +76,6 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $http_host; proxy_connect_timeout 300; proxy_http_version 1.1; diff --git a/hosting/nginx.prod.conf.hbs b/hosting/nginx.prod.conf.hbs index 02ff9f0c7b..f446c928fb 100644 --- a/hosting/nginx.prod.conf.hbs +++ b/hosting/nginx.prod.conf.hbs @@ -12,6 +12,7 @@ http { limit_req_zone $binary_remote_addr zone=ratelimit:10m rate=20r/s; include /etc/nginx/mime.types; default_type application/octet-stream; + proxy_set_header Host $host; charset utf-8; sendfile on; tcp_nopush on; @@ -68,12 +69,10 @@ http { location /app { proxy_pass http://$apps:4002; rewrite ^/app/(.*)$ /$1 break; - proxy_set_header Host $host; } location = / { proxy_pass http://$apps:4002; - proxy_set_header Host $host; } {{#if watchtower}} @@ -85,22 +84,18 @@ http { proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://$apps:4002; - proxy_set_header Host $host; } location ~ ^/api/(system|admin|global)/ { proxy_pass http://$worker:4003; - proxy_set_header Host $host; } location /worker/ { proxy_pass http://$worker:4003; rewrite ^/worker/(.*)$ /$1 break; - proxy_set_header Host $host; } location /api/ { @@ -115,7 +110,6 @@ http { proxy_http_version 1.1; proxy_set_header Connection $connection_upgrade; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; @@ -131,7 +125,6 @@ http { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header Host $http_host; proxy_connect_timeout 300; proxy_http_version 1.1;