Skip to content

Commit 38e044c

Browse files
committed
mailman: automate year match code
1 parent 34737a6 commit 38e044c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cookbooks/mailman/templates/default/apache.erb

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@
8484
ScriptAlias /subscribe /usr/lib/cgi-bin/mailman/subscribe
8585
ScriptAlias /mailman/ /usr/lib/cgi-bin/mailman/
8686

87-
<Location ~ "/pipermail/([^/]+)/(2004|2005|2006|2007|2008|2009|2010|2011|2012|2013|2014|2015|2016|2017|2018|2019|2020|2021|2022)">
87+
<% last_year = year = Time.now.year - 1 %>
88+
<Location ~ "/pipermail/([^/]+)/(<%= (2004..last_year).to_a.join('|') %>)">
8889
ExpiresActive On
8990
ExpiresDefault "access plus 180 days"
9091
</Location>

0 commit comments

Comments
 (0)