From 5e4d0bc91671073f8f327ef6d46843e6e198327b Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Wed, 13 Dec 2023 20:14:36 +0530 Subject: [PATCH] fix: Revert bind changes in Caddyfile --- deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs b/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs index aeaf90788c7..02d7c121aaf 100644 --- a/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs +++ b/deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs @@ -33,14 +33,6 @@ const tlsConfig = certLocation == null ? "" : `tls ${certLocation}/fullchain.pem const frameAncestorsPolicy = (process.env.APPSMITH_ALLOWED_FRAME_ANCESTORS || "'self'") .replace(/;.*$/, "") -const bind = [ - // The custom domain is expected to only have the domain. So if it has protocol or trailing slash, we remove it. - (APPSMITH_CUSTOM_DOMAIN || "").replace(/^https?:\/\//, "").replace(/\/$/, ""), - // Also bind to http on 80, so that if the cert provisioning fails, we can still serve on http. - // But this still means that if cert provisioning is successful, http will be redirected to https. - //":80", -].join(" ") - const parts = [] parts.push(` @@ -129,7 +121,7 @@ localhost:80 127.0.0.1:80 { import all-config } -${bind} { +${APPSMITH_CUSTOM_DOMAIN || ":80"} { import all-config ${tlsConfig} }