Skip to content

Commit

Permalink
fix: Revert bind changes in Caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sharat87 committed Dec 13, 2023
1 parent 9f0e30e commit 5e4d0bc
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions deploy/docker/fs/opt/appsmith/caddy-reconfigure.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(`
Expand Down Expand Up @@ -129,7 +121,7 @@ localhost:80 127.0.0.1:80 {
import all-config
}
${bind} {
${APPSMITH_CUSTOM_DOMAIN || ":80"} {
import all-config
${tlsConfig}
}
Expand Down

0 comments on commit 5e4d0bc

Please sign in to comment.