|
8 | 8 | # |
9 | 9 | # @param internal_proxy |
10 | 10 | # A list of IP addresses, IP blocks or hostname that are trusted to set a |
11 | | -# valid value inside specified header. Unlike the `$trusted_proxy_ips` |
| 11 | +# valid value inside specified header. Unlike the `$trusted_proxy` |
12 | 12 | # parameter, any IP address (including private addresses) presented by these |
13 | 13 | # proxies will trusted by `mod_remoteip`. |
14 | 14 | # |
15 | | -# @param proxy_ips |
16 | | -# *Deprecated*: use `$internal_proxy` instead. |
17 | | -# |
18 | 15 | # @param internal_proxy_list |
19 | 16 | # The path to a file containing a list of IP addresses, IP blocks or hostname |
20 | 17 | # that are trusted to set a valid value inside the specified header. See |
|
39 | 36 | # any private IP presented by these proxies will be disgarded by |
40 | 37 | # `mod_remoteip`. |
41 | 38 | # |
42 | | -# @param trusted_proxy_ips |
43 | | -# *Deprecated*: use `$trusted_proxy` instead. |
44 | | -# |
45 | 39 | # @param trusted_proxy_list |
46 | 40 | # The path to a file containing a list of IP addresses, IP blocks or hostname |
47 | 41 | # that are trusted to set a valid value inside the specified header. See |
|
51 | 45 | # |
52 | 46 | class apache::mod::remoteip ( |
53 | 47 | String $header = 'X-Forwarded-For', |
54 | | - Optional[Array[Stdlib::Host]] $internal_proxy = undef, |
55 | | - Optional[Array[Stdlib::Host]] $proxy_ips = undef, |
| 48 | + Array[Stdlib::Host] $internal_proxy = ['127.0.0.1'], |
56 | 49 | Optional[Stdlib::Absolutepath] $internal_proxy_list = undef, |
57 | 50 | Optional[String] $proxies_header = undef, |
58 | 51 | Boolean $proxy_protocol = false, |
59 | 52 | Optional[Array[Stdlib::Host]] $proxy_protocol_exceptions = undef, |
60 | 53 | Optional[Array[Stdlib::Host]] $trusted_proxy = undef, |
61 | | - Optional[Array[Stdlib::Host]] $trusted_proxy_ips = undef, |
62 | 54 | Optional[Stdlib::Absolutepath] $trusted_proxy_list = undef, |
63 | 55 | ) { |
64 | 56 | include apache |
65 | 57 |
|
66 | | - if $proxy_ips { |
67 | | - deprecation('apache::mod::remoteip::proxy_ips', 'This parameter is deprecated, please use `internal_proxy`.') |
68 | | - $_internal_proxy = $proxy_ips |
69 | | - } elsif $internal_proxy { |
70 | | - $_internal_proxy = $internal_proxy |
71 | | - } else { |
72 | | - $_internal_proxy = ['127.0.0.1'] |
73 | | - } |
74 | | - |
75 | | - if $trusted_proxy_ips { |
76 | | - deprecation('apache::mod::remoteip::trusted_proxy_ips', 'This parameter is deprecated, please use `trusted_proxy`.') |
77 | | - $_trusted_proxy = $trusted_proxy_ips |
78 | | - } else { |
79 | | - $_trusted_proxy = $trusted_proxy |
80 | | - } |
81 | | - |
82 | 58 | ::apache::mod { 'remoteip': } |
83 | 59 |
|
84 | 60 | $template_parameters = { |
85 | 61 | header => $header, |
86 | | - internal_proxy => $_internal_proxy, |
| 62 | + internal_proxy => $internal_proxy, |
87 | 63 | internal_proxy_list => $internal_proxy_list, |
88 | 64 | proxies_header => $proxies_header, |
89 | 65 | proxy_protocol => $proxy_protocol, |
90 | 66 | proxy_protocol_exceptions => $proxy_protocol_exceptions, |
91 | | - trusted_proxy => $_trusted_proxy, |
| 67 | + trusted_proxy => $trusted_proxy, |
92 | 68 | trusted_proxy_list => $trusted_proxy_list, |
93 | 69 | } |
94 | 70 |
|
|
0 commit comments