From 7a0f654b8eb88ef7c5044d5c69b4a45498c418d1 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Kandula Date: Tue, 26 Nov 2024 11:41:01 +0530 Subject: [PATCH] chore: Fix env varibles in 404.html (#37672) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Environment variables in `404.html` page aren't getting replaced with their values. This PR fixes that. ## Automation /test sanity ### :mag: Cypress test results > [!WARNING] > Workflow run: > Commit: 56b10fddf2ee7ed180ed59845b6f0223cd26b06a > Cypress dashboard. > Tags: @tag.Sanity > Spec: > It seems like **no tests ran** 😔. We are not able to recognize it, please check workflow here. >
Mon, 25 Nov 2024 08:48:10 UTC ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No ## Summary by CodeRabbit - **New Features** - Improved dynamic retrieval of environment variables for better integration with environment-specific settings in the 404 error page. - Enhanced handling of HTML files, including the 404 page, during the configuration process. - **Bug Fixes** - Improved error handling for missing SSL certificates and custom domains. - **Documentation** - Updated logic for processing HTML files to ensure correct paths and configurations are applied. --- app/client/public/404.html | 4 ++-- .../fs/opt/appsmith/caddy-reconfigure.mjs | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/client/public/404.html b/app/client/public/404.html index fde74d5a40..3d7109f0d3 100644 --- a/app/client/public/404.html +++ b/app/client/public/404.html @@ -27,8 +27,8 @@ return result; } - const smartLookId = parseConfig("__APPSMITH_SMART_LOOK_ID__"); - const sentryDSN = parseConfig("__APPSMITH_SENTRY_DSN__"); + const smartLookId = parseConfig('{{env "APPSMITH_SMART_LOOK_ID"}}'); + const sentryDSN = parseConfig('{{env "APPSMITH_SENTRY_DSN"}}');