Skip to content

Commit d84f4ef

Browse files
committed
Merge branch 'develop'
2 parents 04de65e + fbc018c commit d84f4ef

File tree

16 files changed

+116
-59
lines changed

16 files changed

+116
-59
lines changed

.github/workflows/maven-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
runs-on: ${{ matrix.os }}
2020
strategy:
2121
matrix:
22-
java: [11, 17]
22+
java: [11, 17, 21]
2323
os: [ubuntu-latest]
2424
distribution: [temurin]
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2929

3030
- name: Setup JDK
3131
uses: actions/setup-java@v3

.github/workflows/maven-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Configure GIT
2323
run: |

.github/workflows/release-from-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions:
1313
contents: write
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
- uses: ncipollo/release-action@v1
1717
with:
1818
body: 'Changes: https://devops.wcm.io/conga/definitions/aem/changes-report.html'

changes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
xsi:schemaLocation="http://maven.apache.org/changes/1.0.0 http://maven.apache.org/plugins/maven-changes-plugin/xsd/changes-1.0.0.xsd">
2424
<body>
2525

26+
<release version="2.0.4" date="2024-01-26">
27+
<action type="update" dev="sseifert" issue="91">
28+
Role aem-dispatcher-cloud: Sync with default dispatcher configuration from Adobe AEM project archetype 40 to 47.
29+
</action>
30+
</release>
31+
2632
<release version="2.0.2" date="2023-09-08">
2733
<action type="fix" dev="trichter" issue="90">
2834
Role aem-dispatcher-cloud: Use https in rewriteHomepageRedirect to avoid unnecessary http redirect.

conga-aem-definitions/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<parent>
2626
<groupId>io.wcm.devops.conga.definitions</groupId>
2727
<artifactId>io.wcm.devops.conga.definitions.aem.parent</artifactId>
28-
<version>2.0.2</version>
28+
<version>2.0.4</version>
2929
<relativePath>../parent/pom.xml</relativePath>
3030
</parent>
3131

3232
<groupId>io.wcm.devops.conga.definitions</groupId>
3333
<artifactId>io.wcm.devops.conga.definitions.aem</artifactId>
34-
<version>2.0.2</version>
34+
<version>2.0.4</version>
3535
<packaging>config-definition</packaging>
3636

3737
<name>CONGA AEM Definitions</name>

conga-aem-definitions/src/main/resources/aem-sdk-dispatcher/src/conf.d/available_vhosts/default.vhost

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,6 @@ Include conf.d/variables/custom.vars
6060

6161
# Rewrite index page internally, pass through (PT)
6262
RewriteRule "^(/?)$" "/index.html" [PT]
63-
</IfModule>
6463

65-
# Content Services/Sling Model Exporter: Cache for 5min with background refresh 1h on browser and 12h on CDN to avoid MISS
66-
<LocationMatch "^/content/.*\.model\.json$">
67-
Header set Cache-Control "max-age=300,stale-while-revalidate=3600" "expr=%{REQUEST_STATUS} < 400"
68-
Header set Surrogate-Control "stale-while-revalidate=43200,stale-if-error=43200" "expr=%{REQUEST_STATUS} < 400"
69-
Header set Age 0
70-
</LocationMatch>
64+
</IfModule>
7165
</VirtualHost>

conga-aem-definitions/src/main/resources/aem-sdk-dispatcher/src/conf.d/dispatcher_vhost.conf

Lines changed: 76 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ Include conf.d/variables/global.vars
1414
# WARNING!!! The probe paths below are INTERNAL and RESERVED - please DO NOT USE them in your virtual host configurations!
1515

1616
# Liveness probe URL
17-
Alias "/system/probes/live" /etc/httpd/probes/live-status.json
17+
Alias "/system/probes/live" probes/live-status.json
1818
# Readiness probe URL
19-
Alias "/system/probes/ready" /etc/httpd/probes/ready-status.json
19+
Alias "/system/probes/ready" probes/ready-status.json
2020
# Startup probe URL
21-
Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
21+
Alias "/system/probes/start" probes/startup-status.json
2222

2323
# internal probes endpoint
2424
<LocationMatch "/system/probes">
@@ -54,31 +54,18 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
5454
</LocationMatch>
5555
</IfDefine>
5656

57-
# SITES-5185 - Ensure all GraphQL Queries to production publisher are using Persistent Queries and not direct query requests
58-
<IfDefine ENVIRONMENT_PROD>
59-
SSLProxyEngine on
60-
<LocationMatch "^/content/_cq_graphql/.*/endpoint.json$">
61-
RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^$ [OR]
62-
RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^false$
63-
RewriteRule ^/(.*)$ - [R=404,L]
64-
</LocationMatch>
65-
</IfDefine>
66-
<IfDefine ENVIRONMENT_STAGE>
67-
SSLProxyEngine on
68-
<LocationMatch "^/content/_cq_graphql/.*/endpoint.json$">
69-
RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^$ [OR]
70-
RewriteCond %{ENV:ENABLE_GRAPHQL_ENDPOINT} ^false$
71-
RewriteRule ^/(.*)$ - [R=404,L]
72-
</LocationMatch>
73-
</IfDefine>
74-
7557
# If the module loads correctly then apply base settings for the module
7658
<IfModule disp_apache2.c>
7759
# location of the configuration file. eg: 'conf/dispatcher.any'
7860
DispatcherConfig conf.dispatcher.d/dispatcher.any
7961

8062
# Format for the dispatcher log file
81-
LogFormat "%t \"%m %{dispatcher:uri}e%q %H\" %{dispatcher:status}e %{dispatcher:cache}e [%{dispatcher:backend}e] %{ms}Tms \"%{Host}i\"" dispatcher
63+
<IfDefine !LOG_X_REQUEST_ID>
64+
LogFormat "%t \"%m %{dispatcher:uri}e%q %H\" %{dispatcher:status}e %{dispatcher:cache}e [%{dispatcher:backend}e] %{ms}Tms \"%{Host}i\"" dispatcher
65+
</IfDefine>
66+
<IfDefine LOG_X_REQUEST_ID>
67+
LogFormat "%t \"%m %{dispatcher:uri}e%q %H\" %{dispatcher:status}e %{dispatcher:cache}e [%{dispatcher:backend}e] %{ms}Tms \"%{Host}i\" \"%{x-request-id}i\"" dispatcher
68+
</IfDefine>
8269
CustomLog "| /usr/sbin/rotatelogs -e -f -t logs/dispatcher.log 86400" dispatcher "expr=%{HANDLER} == 'dispatcher-handler'"
8370

8471
# Log level for the dispatcher module
@@ -116,20 +103,23 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
116103
Header unset Age
117104
</IfDefine>
118105

119-
# SITES-3659 Prevent re-encodes of URLs sent to GraphQL Persisted Queries API endpoint
120-
<LocationMatch "/graphql/execute.json/.*">
121-
ProxyPassMatch http://${AEM_HOST}:${AEM_PORT} nocanon
122-
</LocationMatch>
106+
# SITES-11040 Do ProxyPassMatch, if caching for GraphQL Persisted Queries is not enabled
107+
<IfDefine !CACHE_GRAPHQL_PERSISTED_QUERIES>
108+
# SITES-3659 Prevent re-encodes of URLs sent to GraphQL Persisted Queries API endpoint
109+
<LocationMatch "/graphql/execute.json/.*">
110+
ProxyPassMatch http://${AEM_HOST}:${AEM_PORT} nocanon
111+
</LocationMatch>
112+
</IfDefine>
123113

124-
# (legacy) Allow ingressroute checks through on /systemready (regardless of dispatcher filters)
114+
# Legacy /systemready mapped to new Health probe URL /system/probes/health in AEM
125115
<Location "/systemready">
126-
ProxyPass http://${AEM_HOST}:${AEM_PORT}/systemready
116+
ProxyPass http://${AEM_HOST}:${AEM_PORT}/system/probes/health
127117
RewriteEngine Off
128118
</Location>
129119

130-
# new Health probe URL to legacy /systemready URL mapping
120+
# Allow ingressroute checks through on /system/probes/health (regardless of dispatcher filters)
131121
<Location "/system/probes/health">
132-
ProxyPass http://${AEM_HOST}:${AEM_PORT}/systemready
122+
ProxyPass http://${AEM_HOST}:${AEM_PORT}/system/probes/health
133123
RewriteEngine Off
134124
</Location>
135125

@@ -154,6 +144,9 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
154144
ProxyPassMatch ${COMMERCE_ENDPOINT}$2
155145
ProxyPassReverse ${COMMERCE_ENDPOINT}
156146
RewriteEngine Off
147+
# CIF-2971: Experience Platform Connector cookie to header forwarding
148+
SetEnvIfNoCase Cookie "(^| )aep-segments-membership=([^;]*)" AEP_SEGMENTS_MEMBERSHIP=$2
149+
RequestHeader set aep-segments-membership "%{AEP_SEGMENTS_MEMBERSHIP}e" env=AEP_SEGMENTS_MEMBERSHIP
157150
</LocationMatch>
158151
</IfDefine>
159152
<IfDefine COMMERCE_ENDPOINT_2>
@@ -165,6 +158,8 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
165158
ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_2}$2
166159
ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_2}
167160
RewriteEngine Off
161+
SetEnvIfNoCase Cookie "(^| )aep-segments-membership=([^;]*)" AEP_SEGMENTS_MEMBERSHIP=$2
162+
RequestHeader set aep-segments-membership "%{AEP_SEGMENTS_MEMBERSHIP}e" env=AEP_SEGMENTS_MEMBERSHIP
168163
</LocationMatch>
169164
</IfDefine>
170165
<IfDefine COMMERCE_ENDPOINT_3>
@@ -176,6 +171,8 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
176171
ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_3}$2
177172
ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_3}
178173
RewriteEngine Off
174+
SetEnvIfNoCase Cookie "(^| )aep-segments-membership=([^;]*)" AEP_SEGMENTS_MEMBERSHIP=$2
175+
RequestHeader set aep-segments-membership "%{AEP_SEGMENTS_MEMBERSHIP}e" env=AEP_SEGMENTS_MEMBERSHIP
179176
</LocationMatch>
180177
</IfDefine>
181178
<IfDefine COMMERCE_ENDPOINT_4>
@@ -187,6 +184,8 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
187184
ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_4}$2
188185
ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_4}
189186
RewriteEngine Off
187+
SetEnvIfNoCase Cookie "(^| )aep-segments-membership=([^;]*)" AEP_SEGMENTS_MEMBERSHIP=$2
188+
RequestHeader set aep-segments-membership "%{AEP_SEGMENTS_MEMBERSHIP}e" env=AEP_SEGMENTS_MEMBERSHIP
190189
</LocationMatch>
191190
</IfDefine>
192191
<IfDefine COMMERCE_ENDPOINT_5>
@@ -198,6 +197,8 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
198197
ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_5}$2
199198
ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_5}
200199
RewriteEngine Off
200+
SetEnvIfNoCase Cookie "(^| )aep-segments-membership=([^;]*)" AEP_SEGMENTS_MEMBERSHIP=$2
201+
RequestHeader set aep-segments-membership "%{AEP_SEGMENTS_MEMBERSHIP}e" env=AEP_SEGMENTS_MEMBERSHIP
201202
</LocationMatch>
202203
</IfDefine>
203204

@@ -215,7 +216,7 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json
215216
</Directory>
216217

217218
# internal metadata endpoint
218-
Alias "/gitinit-status" /etc/httpd/metadata/gitinit-status.json
219+
Alias "/gitinit-status" metadata/gitinit-status.json
219220

220221
<LocationMatch "/gitinit-status">
221222
RewriteEngine Off
@@ -227,6 +228,50 @@ Alias "/gitinit-status" /etc/httpd/metadata/gitinit-status.json
227228
Require expr "%{HTTP_HOST} == '${POD_NAME}'"
228229
</Directory>
229230

231+
# Dedicated vhost for EaaS:
232+
# (currently disabled, but customers can expect it to be enabled in future versions - CQ-4349728)
233+
#<VirtualHost *:80>
234+
# ServerName "test.eaas"
235+
# # possibility to make overrides before directives in this vhost
236+
# IncludeOptional conf.d/includes/first-listed-vhost.pre.includes
237+
# # since this vhost is first-listed one, this setting influences other vhosts - see https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfieldsize
238+
# LimitRequestFieldSize 32768
239+
# DocumentRoot /var/www/localhost/htdocs
240+
# AllowEncodedSlashes NoDecode
241+
# <IfModule mod_headers.c>
242+
# Header add X-Vhost "test.eaas"
243+
# </IfModule>
244+
# <Directory "/var/www/localhost/htdocs">
245+
# Options Indexes FollowSymLinks
246+
# AllowOverride None
247+
# Require all granted
248+
# </Directory>
249+
#
250+
# # SKYOPS-49434: Allow EaaS to access publish instance directly for dev and stage environments when test.eaas vhost is requested
251+
# <IfDefine ENVIRONMENT_DEV>
252+
# <LocationMatch "/">
253+
# ProxyPassMatch http://${AEM_HOST}:${AEM_PORT}
254+
# RewriteEngine Off
255+
# </LocationMatch>
256+
# </IfDefine>
257+
# <IfDefine ENVIRONMENT_STAGE>
258+
# <LocationMatch "/">
259+
# ProxyPassMatch http://${AEM_HOST}:${AEM_PORT}
260+
# RewriteEngine Off
261+
# </LocationMatch>
262+
# </IfDefine>
263+
# # 403 Forbidden on prod
264+
# <IfDefine ENVIRONMENT_PROD>
265+
# <IfModule mod_rewrite.c>
266+
# RewriteEngine on
267+
# RewriteRule ^ - [F]
268+
# </IfModule>
269+
# </IfDefine>
270+
# # possibility to make overrides after directives in this vhost
271+
# IncludeOptional conf.d/includes/first-listed-vhost.post.includes
272+
#</VirtualHost>
273+
274+
# Customer's vhosts:
230275
Include conf.d/enabled_vhosts/*.vhost
231276

232277
# Create a catch-all vhost

conga-aem-definitions/src/main/resources/aem-sdk-dispatcher/src/conf.d/includes/.keep

Whitespace-only changes.

conga-aem-definitions/src/main/resources/aem-sdk-dispatcher/src/conf.d/rewrites/default_rewrite.rules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ RewriteRule .* - [F]
3838
# Block wp-login
3939
RewriteRule ^.*wp-login - [F,NC,L]
4040

41-
# Allow caching of persisted queries
41+
# Allow the dispatcher to be able to cache persisted queries - they need an extension for the cache file
4242
RewriteCond %{REQUEST_URI} ^/graphql/execute.json
43-
RewriteRule ^/(.*)$ /$1;.json [PT,L]
43+
RewriteRule ^/(.*)$ /$1;.json [PT]

conga-aem-definitions/src/main/resources/aem-sdk-dispatcher/src/conf.d/rewrites/rewrite.rules

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,6 @@ RewriteCond %{REQUEST_URI} !^/saml_login
2020
RewriteCond %{REQUEST_URI} !^/system
2121
RewriteCond %{REQUEST_URI} !^/tmp
2222
RewriteCond %{REQUEST_URI} !^/var
23+
RewriteCond %{REQUEST_URI} !^/conf/(.+\.jpe?g|.+\.png|.+\.svg)$
2324
RewriteCond %{REQUEST_URI} (.html|.jpe?g|.png|.svg)$
2425
RewriteRule ^/(.*)$ /content/${CONTENT_FOLDER_NAME}/$1 [PT,L]

0 commit comments

Comments
 (0)