diff --git a/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf b/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf index b226608e0..744fe9b3b 100644 --- a/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf +++ b/src/main/archetype/dispatcher.cloud/src/conf.d/dispatcher_vhost.conf @@ -148,12 +148,64 @@ Alias "/system/probes/start" /etc/httpd/probes/startup-status.json ProxyRemote ${COMMERCE_ENDPOINT} "http://${AEM_HTTP_PROXY_HOST}:${AEM_HTTP_PROXY_PORT}" - - ProxyPass ${COMMERCE_ENDPOINT} + + # Use an empty back reference from ProxyPassMatch to the LocationMatch regex to prevent the + # original URL being appended to the proxy request + ProxyPassMatch ${COMMERCE_ENDPOINT}$2 ProxyPassReverse ${COMMERCE_ENDPOINT} - RewriteEngine Off + RewriteEngine Off + + SSLProxyEngine on + + ProxyRemote ${AEM_COMMERCE_ENDPOINT_2} "http://${AEM_HTTP_PROXY_HOST}:${AEM_HTTP_PROXY_PORT}" + + + ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_2}$2 + ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_2} + RewriteEngine Off + + + + SSLProxyEngine on + + ProxyRemote ${AEM_COMMERCE_ENDPOINT_3} "http://${AEM_HTTP_PROXY_HOST}:${AEM_HTTP_PROXY_PORT}" + + + ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_3}$2 + ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_3} + RewriteEngine Off + + + + SSLProxyEngine on + + ProxyRemote ${AEM_COMMERCE_ENDPOINT_4} "http://${AEM_HTTP_PROXY_HOST}:${AEM_HTTP_PROXY_PORT}" + + + ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_4}$2 + ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_4} + RewriteEngine Off + + + + SSLProxyEngine on + + ProxyRemote ${AEM_COMMERCE_ENDPOINT_5} "http://${AEM_HTTP_PROXY_HOST}:${AEM_HTTP_PROXY_PORT}" + + + ProxyPassMatch ${AEM_COMMERCE_ENDPOINT_5}$2 + ProxyPassReverse ${AEM_COMMERCE_ENDPOINT_5} + RewriteEngine Off + + + +# ASSETS-10359 Prevent rewrites and filtering of Delivery API URLs + + ProxyPassMatch http://${AEM_HOST}:${AEM_PORT} + RewriteEngine Off + # Disable access to default CGI scripts diff --git a/src/main/archetype/dispatcher.cloud/src/conf.d/enabled_vhosts/vhosts.conf b/src/main/archetype/dispatcher.cloud/src/conf.d/enabled_vhosts/vhosts.conf new file mode 100644 index 000000000..0b2fdb47d --- /dev/null +++ b/src/main/archetype/dispatcher.cloud/src/conf.d/enabled_vhosts/vhosts.conf @@ -0,0 +1,2 @@ +## Include all of the customers *.vhost files +Include conf.d/enabled_vhosts/*.vhost diff --git a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/available_farms/default.farm b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/available_farms/default.farm index 4b8aa0a76..9c94b65cb 100644 --- a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/available_farms/default.farm +++ b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/available_farms/default.farm @@ -87,11 +87,15 @@ # The ignoreUrlParams section contains query string parameter names that # should be ignored when determining whether some request's output can be # cached or delivered from cache. - # In this example configuration, the "q" parameter will be ignored. - # /ignoreUrlParams { - # /0001 { /glob "*" /type "deny" } - # /0002 { /glob "q" /type "allow" } - # } + # In this example configuration, the "q" parameter will be ignored as + # well as general marketing related parameters such as e.g. utm_campaign. + # Marketing parameters can normally be ignored on most websites as they are tracked + # through different means. + /ignoreUrlParams { + /0001 { /glob "*" /type "deny" } + # /0002 { /glob "q" /type "allow" } + $include "../cache/marketing_query_parameters.any" + } # Cache response headers next to a cached file. On the first request to # an uncached resource, all headers matching one of the values found here diff --git a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/cache/marketing_query_parameters.any b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/cache/marketing_query_parameters.any new file mode 100644 index 000000000..82f2be2a2 --- /dev/null +++ b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/cache/marketing_query_parameters.any @@ -0,0 +1,39 @@ +# +# These are the marketing parameters ignored for the dispatcher. +# +# Marketing parameters rarely have impact on what content is loaded +# If your website is using marketing campaigns that do not influence the content +# of your website enable the parameters that you expect or add others to enable +# caching of in the dispatcher. + +# Commonly used +# /1001 { /glob "cid" /type "allow" } +# /1002 { /glob "partnerId" /type "allow" } + +# Urchin Tracking Module base parameters. +/1010 { /glob "utm_content" /type "allow" } +/1011 { /glob "utm_source" /type "allow" } +/1012 { /glob "utm_medium" /type "allow" } +/1013 { /glob "utm_campaign" /type "allow" } +/1014 { /glob "utm_term" /type "allow" } + +# /1015 { /glob "utm_audience" /type "allow" } +# /1016 { /glob "utm_creative" /type "allow" } + +# /1017 { /glob "utm_source_platform" /type "allow" } # Google Analytics 4 +# /1018 { /glob "utm_creative_format" /type "allow" } # Google Analytics 4 +# /1019 { /glob "utm_marketing_tactic" /type "allow" } # Google Analytics 4 + +/1030 { /glob "gclid" /type "allow" } # Google Ads +/1031 { /glob "gclsrc" /type "allow" } # Google Ads + +/1040 { /glob "wbraid" /type "allow" } # Parameter for iOS14+ +/1041 { /glob "gbraid" /type "allow" } # Parameter for iOS14+ + +/1050 { /glob "dcli" /type "allow" } # DoubleClick click identifier +/1051 { /glob "ga" /type "allow" } +# /1052 { /glob "_ga" /type "allow" } + +/1060 { /glob "fbclid" /type "allow" } # Facebook click identifier + +/1070 { /glob "twclid" /type "allow" } # Twitter click identifier diff --git a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/clientheaders/default_clientheaders.any b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/clientheaders/default_clientheaders.any index 76f14d099..077a43f81 100644 --- a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/clientheaders/default_clientheaders.any +++ b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/clientheaders/default_clientheaders.any @@ -41,3 +41,4 @@ "x-requested-with" "If-Modified-Since" "Authorization" +"x-request-id" diff --git a/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/enabled_farms/farms.any b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/enabled_farms/farms.any new file mode 100644 index 000000000..8daf6344b --- /dev/null +++ b/src/main/archetype/dispatcher.cloud/src/conf.dispatcher.d/enabled_farms/farms.any @@ -0,0 +1,2 @@ +## Include all of the customers *.farm files +$include "./*.farm"