Skip to content

Commit

Permalink
Merge pull request #1309 from zspitzer/only-deploy-enabled-admin
Browse files Browse the repository at this point in the history
LDEV-4441 don't deploy admin when not enabled
  • Loading branch information
michaeloffner authored Dec 18, 2023
2 parents 3e411fa + 478987a commit 02a870a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions core/src/main/java/lucee/runtime/config/ConfigWebFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -1427,10 +1427,12 @@ private static void createContextFiles(Resource configDir, ServletConfig servlet
if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-context.lar", f);
else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-context.lar", f);

// lucee-admin
f = contextDir.getRealResource("lucee-admin.lar");
if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-admin.lar", f);
else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-admin.lar", f);
// lucee-admin (only deploy if enabled)
if (Caster.toBoolean(SystemUtil.getSystemPropOrEnvVar("lucee.admin.enabled", "true"), true)) {
f = contextDir.getRealResource("lucee-admin.lar");
if (!f.exists() || doNew) createFileFromResourceEL("/resource/context/lucee-admin.lar", f);
else createFileFromResourceCheckSizeDiffEL("/resource/context/lucee-admin.lar", f);
}

// lucee-doc
f = contextDir.getRealResource("lucee-doc.lar");
Expand Down

0 comments on commit 02a870a

Please sign in to comment.