File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 97
97
# used for mp4 streaming. Default: false
98
98
# [*flv*] - Indicates whether or not this loation can be
99
99
# used for flv streaming. Default: false
100
+ # [*expires*] - Setup expires time for locations content
100
101
#
101
102
#
102
103
# Actions:
192
193
$auth_basic_user_file = undef ,
193
194
$rewrite_rules = [],
194
195
$priority = 500,
195
- $mp4 = false ,
196
- $flv = false ,
196
+ $mp4 = false ,
197
+ $flv = false ,
198
+ $expires = undef ,
197
199
) {
198
200
199
201
$root_group = $::nginx::config::root_group
341
343
if (($priority + 0) < 401) or (($priority + 0) > 899) {
342
344
fail(' $priority must be in the range 401-899.' )
343
345
}
346
+ if ($expires != undef ) {
347
+ validate_string($expires )
348
+ }
344
349
345
350
# # Shared Variables
346
351
$ensure_real = $ensure ? {
Original file line number Diff line number Diff line change 77
77
value : 'any' ,
78
78
match : ' satisfy any;'
79
79
} ,
80
+ {
81
+ title : 'should set expires' ,
82
+ attr : 'expires' ,
83
+ value : '33d' ,
84
+ match : ' expires 33d;'
85
+ } ,
80
86
{
81
87
title : 'should set location_allow' ,
82
88
attr : 'location_allow' ,
Original file line number Diff line number Diff line change 12
12
<% if @location_satisfy -%>
13
13
satisfy <%= @location_satisfy -%> ;
14
14
<% end -%>
15
+ <% if @expires -%>
16
+ expires <%= @expires %> ;
17
+ <% end -%>
15
18
<% if @location_allow -%>
16
19
<%- @location_allow.each do |allow_rule| -%>
17
20
allow <%= allow_rule %> ;
You can’t perform that action at this time.
0 commit comments