fix: Re-gzip html files after env variables substitution (#23546)
We replace env variables in `index.html`, `view.html` and `edit.html`, just before start NGINX. But the `.gz` versions of these files don't have these changes applied to them. This PR gzips those HTML files again, after the substitutions are applied. From https://github.com/appsmithorg/appsmith/pull/23539#issuecomment-1554509537.
This commit is contained in:
parent
ba0cedc052
commit
a08b525007
|
|
@ -84,6 +84,9 @@ apply-env-vars() {
|
||||||
)
|
)
|
||||||
fs.writeFileSync("'"$served"'", content)
|
fs.writeFileSync("'"$served"'", content)
|
||||||
'
|
'
|
||||||
|
pushd "$(dirname "$served")"
|
||||||
|
gzip --keep --force "$(basename "$served")"
|
||||||
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
apply-env-vars /opt/appsmith/index.html.original /opt/appsmith/editor/index.html
|
apply-env-vars /opt/appsmith/index.html.original /opt/appsmith/editor/index.html
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user