Skip to content

Commit

Permalink
Add the ability to specify GeoIPScanProxyHeaderField for mod_geoip
Browse files Browse the repository at this point in the history
  • Loading branch information
Dave Garbus committed May 19, 2015
1 parent aff0c2b commit 4673e29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifests/mod/geoip.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
$output = 'All',
$enable_utf8 = undef,
$scan_proxy_headers = undef,
$scan_proxy_header_field = undef,
$use_last_xforwarededfor_ip = undef,
) {
::apache::mod { 'geoip': }
Expand All @@ -16,6 +17,7 @@
# - output
# - enable_utf8
# - scan_proxy_headers
# - scan_proxy_header_field
# - use_last_xforwarededfor_ip
file { 'geoip.conf':
ensure => file,
Expand Down
3 changes: 3 additions & 0 deletions templates/mod/geoip.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ GeoIPEnableUTF8 <%= scope.function_bool2httpd([@enable_utf8]) %>
<% if ! @scan_proxy_headers.nil? -%>
GeoIPScanProxyHeaders <%= scope.function_bool2httpd([@scan_proxy_headers]) %>
<% end -%>
<% if ! @scan_proxy_header_field.nil? -%>
GeoIPScanProxyHeaderField <%= @scan_proxy_header_field %>
<% end -%>
<% if ! @use_last_xforwarededfor_ip.nil? -%>
GeoIPUseLastXForwardedForIP <%= scope.function_bool2httpd([@use_last_xforwarededfor_ip]) %>
<% end -%>
Expand Down

0 comments on commit 4673e29

Please sign in to comment.