From a8fde42ea9580d297ce296865569359976b71671 Mon Sep 17 00:00:00 2001 From: Thomas Wolfart Date: Fri, 4 Oct 2024 16:01:36 +0200 Subject: [PATCH 1/6] generate x-vhost value dynamically --- .../conf.d/available_vhosts/tenant.vhost.partials.hbs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/conga-aem-definitions/src/main/templates/aem-dispatcher-cloud/conf.d/available_vhosts/tenant.vhost.partials.hbs b/conga-aem-definitions/src/main/templates/aem-dispatcher-cloud/conf.d/available_vhosts/tenant.vhost.partials.hbs index c4978f5..c27a2fe 100644 --- a/conga-aem-definitions/src/main/templates/aem-dispatcher-cloud/conf.d/available_vhosts/tenant.vhost.partials.hbs +++ b/conga-aem-definitions/src/main/templates/aem-dispatcher-cloud/conf.d/available_vhosts/tenant.vhost.partials.hbs @@ -34,9 +34,11 @@ ServerAlias {{this}} DocumentRoot "${DOCROOT}" # URI dereferencing algorithm is applied at Sling's level, do not decode parameters here AllowEncodedSlashes NoDecode -# Add header breadcrumbs for help in troubleshooting - Header add X-Vhost "publish" + # Add header breadcrumbs for help in troubleshooting +{{#httpdCloudManagerConditional}} + Header add X-Vhost "{{httpd.serverName}}" +{{/httpdCloudManagerConditional}} # Webserver in AEM cloud service is always terminated with SSL RequestHeader set X-Forwarded-SSL "on" From d96f51f7f18b127f970ef0a658a7d0aa92953978 Mon Sep 17 00:00:00 2001 From: Thomas Wolfart Date: Fri, 4 Oct 2024 16:01:50 +0200 Subject: [PATCH 2/6] prepare changelog --- changes.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/changes.xml b/changes.xml index f8e96e7..5455a6b 100644 --- a/changes.xml +++ b/changes.xml @@ -23,6 +23,12 @@ xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd"> + + + Dynamically generate X-Vhost value. + + + Role aem-dispatcher-cloud: Sync with default dispatcher configuration from Adobe AEM project archetype 40 to 47. From fa41259154318658f2ac6841198c4e938f9ed3b3 Mon Sep 17 00:00:00 2001 From: Thomas Wolfart Date: Mon, 7 Oct 2024 17:25:55 +0200 Subject: [PATCH 3/6] generate header for ams variant --- .../conf.d/available_vhosts/tenant.vhost.partials.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs b/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs index 9266439..da63ba7 100644 --- a/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs +++ b/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs @@ -47,7 +47,7 @@ CustomLog logs/vhost_{{tenant}}_access.log {{httpd.logging.accessLogFormat}} DocumentRoot "${PUBLISH_DOCROOT}" # Add header breadcrumbs for help in troubleshooting - Header add X-Vhost "publish" + Header add X-Vhost "{{httpd.serverName}}" # Webserver in AEM cloud service is always terminated with SSL RequestHeader set X-Forwarded-SSL "on" From a44726ccae14af98233a216dedde227ce33172ac Mon Sep 17 00:00:00 2001 From: Thomas Wolfart Date: Mon, 7 Oct 2024 17:29:45 +0200 Subject: [PATCH 4/6] move comment --- .../conf.d/available_vhosts/tenant.vhost.partials.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs b/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs index da63ba7..c9ba437 100644 --- a/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs +++ b/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs @@ -45,8 +45,8 @@ CustomLog logs/vhost_{{tenant}}_access.log {{httpd.logging.accessLogFormat}} {{~#block "generalSettings"}} # Use a document root that matches the one in conf.dispatcher.d/default.farm DocumentRoot "${PUBLISH_DOCROOT}" -# Add header breadcrumbs for help in troubleshooting + # Add header breadcrumbs for help in troubleshooting Header add X-Vhost "{{httpd.serverName}}" # Webserver in AEM cloud service is always terminated with SSL RequestHeader set X-Forwarded-SSL "on" From f1c98177a5b3b6028c564bc51acf8afe172dc84b Mon Sep 17 00:00:00 2001 From: Thomas Wolfart Date: Fri, 11 Oct 2024 08:51:54 +0200 Subject: [PATCH 5/6] use cm conditionals --- .../conf.d/available_vhosts/tenant.vhost.partials.hbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs b/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs index c9ba437..ac06830 100644 --- a/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs +++ b/conga-aem-definitions/src/main/templates/aem-dispatcher-ams/conf.d/available_vhosts/tenant.vhost.partials.hbs @@ -47,7 +47,9 @@ CustomLog logs/vhost_{{tenant}}_access.log {{httpd.logging.accessLogFormat}} DocumentRoot "${PUBLISH_DOCROOT}" # Add header breadcrumbs for help in troubleshooting +{{#httpdCloudManagerConditional}} Header add X-Vhost "{{httpd.serverName}}" +{{/httpdCloudManagerConditional}} # Webserver in AEM cloud service is always terminated with SSL RequestHeader set X-Forwarded-SSL "on" From e51413b499da0ca9238e1a04d14f31d3a85c2839 Mon Sep 17 00:00:00 2001 From: Thomas Wolfart Date: Fri, 11 Oct 2024 08:53:37 +0200 Subject: [PATCH 6/6] prepare changelog --- changes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes.xml b/changes.xml index 5455a6b..26703d5 100644 --- a/changes.xml +++ b/changes.xml @@ -24,7 +24,7 @@ - + Dynamically generate X-Vhost value.