mod-dims
The mod-dims and go-dims configurations are largely the same. go-dims gives some settings better names, and removes unnecessary settings.
This page documents those differences and how to migrate. It's mostly just naming.
New
Since go-dims has a new signing algorithm we added DIMS_SIGNING_ALGORITHM
. Set this to md5
for
compatiblity with mod-dims.
Changed
DimsClient
was removed. Each option it had is now available globally.
The DimsClient
setting had a lot of options:
<appId> <noImageUrl> <cache control max-age> <edge control downstream-ttl> <trustSource?> <minSourceCache> <maxSourceCache> <password>
Here is how they map to go-dims settings:
<appId>
is nowDIMS_CLIENT_ID
<noImageUrl>
is nowDIMS_ERROR_BACKGROUND
<cache control max-age>
is nowDIMS_CACHE_CONTROL_DEFAULT
<edge control downstream-ttl>
is nowDIMS_EDGE_CONTROL_DOWNSTREAM_TTL
<trustedSource>
is nowDIMS_CACHE_CONTROL_USE_ORIGIN
<minSourceCache>
is nowDIMS_CACHE_CONTROL_MIN
<maxSourceCache>
is nowDIMS_CACHE_CONTROL_MAX
<password>
is nowDIMS_SIGNING_KEY
Renamed
DimsCacheExpire
toDIMS_CACHE_CONTROL_DEFAULT
DimsNoImageCacheExpire
toDIMS_CACHE_CONTROL_ERROR
Moved
All settings related to Imagemagick were removed. They didn't disappear though. You can set everything mod-dims could using Imagemagick environment variables.
See the Imagemagick documentation for settings.
DimsImagemagickTimeout
DimsImagemagickMemorySize
DimsImagemagickAreaSize
DimsImagemagickMapSize
DimsImagemagickDiskSize
Removed
DimsDefaultImageURL
DimsAddWhitelist
DimsDisableEncodedFetch
DimsUserAgentEnabled
DimsUserAgentOverride
DimsOptimizeResize
Example: dims.conf
DimsDownloadTimeout 60000
DimsImagemagickTimeout 20000
# DimsClient <appId> <noImageUrl> <cache control max-age> <edge control downstream-ttl> <trustSource?> <minSourceCache> <maxSourceCache> <password>
DimsAddClient TEST http://placehold.it/350x150 604800 604800 trust 604800 604800 t3st
DimsDefaultImageURL http://placehold.it/350x150
DimsCacheExpire 604800
DimsNoImageCacheExpire 60
DimsDefaultImagePrefix
DimsAddWhitelist www.google.com