|
1705 | 1705 | # @param userdir |
1706 | 1706 | # Instances of apache::mod::userdir |
1707 | 1707 | # |
| 1708 | +# @param proxy_protocol |
| 1709 | +# Enable or disable PROXY protocol handling |
| 1710 | +# |
| 1711 | +# @param proxy_protocol_exceptions |
| 1712 | +# Disable processing of PROXY header for certain hosts or networks |
1708 | 1713 | define apache::vhost ( |
1709 | 1714 | Variant[Stdlib::Absolutepath, Boolean] $docroot, |
1710 | 1715 | Boolean $manage_docroot = true, |
|
1966 | 1971 | Apache::OIDCSettings $oidc_settings = {}, |
1967 | 1972 | Optional[Variant[Boolean, String]] $mdomain = undef, |
1968 | 1973 | Optional[Variant[String[1], Array[String[1]]]] $userdir = undef, |
| 1974 | + Optional[Boolean] $proxy_protocol = undef, |
| 1975 | + Array[Stdlib::Host] $proxy_protocol_exceptions = [], |
1969 | 1976 | ) { |
1970 | 1977 | # The base class must be included first because it is used by parameter defaults |
1971 | 1978 | if ! defined(Class['apache']) { |
|
2955 | 2962 | } |
2956 | 2963 | } |
2957 | 2964 |
|
| 2965 | + if $proxy_protocol != undef { |
| 2966 | + include apache::mod::remoteip |
| 2967 | + |
| 2968 | + $proxy_protocol_params = { |
| 2969 | + proxy_protocol => $proxy_protocol, |
| 2970 | + proxy_protocol_exceptions => $proxy_protocol_exceptions, |
| 2971 | + } |
| 2972 | + |
| 2973 | + concat::fragment { "${name}-proxy_protocol": |
| 2974 | + target => "${priority_real}${filename}.conf", |
| 2975 | + order => 400, |
| 2976 | + content => epp('apache/vhost/_proxy_protocol.epp', $proxy_protocol_params), |
| 2977 | + } |
| 2978 | + } |
| 2979 | + |
2958 | 2980 | $file_footer_params = { |
2959 | 2981 | 'define' => $define, |
2960 | 2982 | 'passenger_pre_start' => $passenger_pre_start, |
|
0 commit comments