From 9e178d6c8cfd56dcdd66e445d2f30428f5de1677 Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Mon, 31 Aug 2026 23:20:55 -0400 Subject: [PATCH 1/2] Remove the second example configuration - Delete examples/dims.conf. - Drop it from the shipped configuration check. --- examples/dims.conf | 33 -------------------------------- test/cmake/CheckLoadModule.cmake | 3 +-- 2 files changed, 1 insertion(+), 35 deletions(-) delete mode 100644 examples/dims.conf diff --git a/examples/dims.conf b/examples/dims.conf deleted file mode 100644 index 7bfbdea..0000000 --- a/examples/dims.conf +++ /dev/null @@ -1,33 +0,0 @@ - - - LoadModule dims_module modules/libmod_dims.so - - -DimsDownloadTimeout 60000 -DimsImagemagickTimeout 20000 - -# DimsClient [ ] -DimsAddClient TEST http://placehold.it/350x150 604800 604800 trust 604800 604800 t3st - -DimsDefaultImageURL http://placehold.it/350x150 -DimsCacheExpire 604800 -DimsNoImageCacheExpire 60 - -DimsAddWhitelist *.beetlebug.org *.aolcdn.com -DimsAddWhitelist www.google.com - -## Handler definitions. ## - -AddHandler dims-local .gif .jpg .png - - - SetHandler dims3 - - - - SetHandler dims4 - - - - SetHandler dims-status - diff --git a/test/cmake/CheckLoadModule.cmake b/test/cmake/CheckLoadModule.cmake index c80642c..db1671a 100644 --- a/test/cmake/CheckLoadModule.cmake +++ b/test/cmake/CheckLoadModule.cmake @@ -6,8 +6,7 @@ set(EXPECTED "modules/libmod_dims.so") set(CONFIGS "${DIMS_SOURCE_DIR}/conf/mod_dims.conf.example" "${DIMS_SOURCE_DIR}/test/conf/dims-test.conf" - "${DIMS_SOURCE_DIR}/docker/dims.conf" - "${DIMS_SOURCE_DIR}/examples/dims.conf") + "${DIMS_SOURCE_DIR}/docker/dims.conf") foreach(config IN LISTS CONFIGS) if(NOT EXISTS "${config}") From 544723ea38cda1a858ce7bcc99c0e6539eb39e5a Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Mon, 31 Aug 2026 23:23:39 -0400 Subject: [PATCH 2/2] Comment out the allowlist in the example The example set images.example.com and *.cdn.example.com. An operator sets the hosts their own deployment fetches from. --- conf/mod_dims.conf.example | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conf/mod_dims.conf.example b/conf/mod_dims.conf.example index b5f9fef..e6e97ae 100644 --- a/conf/mod_dims.conf.example +++ b/conf/mod_dims.conf.example @@ -29,9 +29,10 @@ DimsAllowPrivateAddresses off # The hosts an image may come from. A leading *. matches subdomains only, not # the apex. This list applies to /dims3/. A signed request skips it unless you -# enable DimsAllowlistSigned below. -DimsAddWhitelist images.example.com -DimsAddWhitelist *.cdn.example.com +# enable DimsAllowlistSigned below. Name a host before /dims3/ can fetch a +# source. +# DimsAddWhitelist images.example.com +# DimsAddWhitelist *.cdn.example.com # Apply the host allowlist to a signed request and to a redirect. A signed # request skips the allowlist by default. Enable this once the allowlist covers