Hey all -

I was getting pretty frustrated with this due to my own lack of 
understanding.  The best resource I could find on this was:

https://www.rubydoc.info/github/puppetlabs/puppetlabs-apache

Under the *apache::mod::expires* heading it says this:

expires_by_type: Describes a set of MIME content-type and their expiration 
times. Valid options: An array of Hashes, with each Hash's key a valid MIME 
content-type (i.e. 'text/json') and its value following valid interval 
syntax. Default: undef.

For me that was only a hint.  I had to find other examples with similar 
descriptions and actual examples to put it all together.  I am hoping that 
posting this here will make it easier for someone else in the future:

class { '::apache::mod::expires':
      expires_by_type => {
        'image/gif'                         => 'access plus 12 hours',
        'image/png'                       => 'access plus 12 hours',
        'image/jpeg'                       => 'access plus 12 hours',
        'image/svg+xml'                 => 'access plus 12 hours',
        'image/x-icon'                     => 'access plus 2 weeks',
        'application/javascript'        => 'access plus 1 hour',
        'text/css'                             => 'access plus 1 hour',
        'image/vnd.microsoft.icon' => 'access plus 2 weeks',
      }
    }

Getting the MIME types figured out was a minor annoyance in comparison.

I am not setting this forth as a complete list or recommended settings.  
Just as an in the wild syntax example.

I added it to my blog too, just in case...

https://www.teamjuchems.com/2019/06/apache-mod-expires-and-puppet-syntax

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/37d7ac33-9a58-4793-bfcb-9a702653b89c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to