1 |
jpp |
1.1 |
diff -Nur --no-dereference smeserver-mod_maxminddb-1.1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/79externalSSLAccessStringGeoip smeserver-mod_maxminddb-1.1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/79externalSSLAccessStringGeoip |
2 |
|
|
--- smeserver-mod_maxminddb-1.1.0.old/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/79externalSSLAccessStringGeoip 1969-12-31 19:00:00.000000000 -0500 |
3 |
|
|
+++ smeserver-mod_maxminddb-1.1.0/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/79externalSSLAccessStringGeoip 2021-04-02 16:59:48.646000000 -0400 |
4 |
|
|
@@ -0,0 +1,15 @@ |
5 |
|
|
+{ |
6 |
|
|
+ #--------------------------------------------------------------------- |
7 |
|
|
+ # Grab ValidFromGeoIP access list property of httpd-admin |
8 |
|
|
+ # SSL enabled virtual hosts should only allow access from IP's in |
9 |
|
|
+ # this list, as well as local networks. |
10 |
|
|
+ #--------------------------------------------------------------------- |
11 |
|
|
+ |
12 |
|
|
+ $OUT = ''; |
13 |
|
|
+ |
14 |
|
|
+ my $validFromGeoIP = ${'httpd-admin'}{'ValidFromGeoIP'}; |
15 |
|
|
+ return unless defined $validFromGeoIP; |
16 |
|
|
+ $validFromGeoIP =~ s/,/|/g; |
17 |
|
|
+ $OUT .= " SetEnvIf MM_COUNTRY_CODE ^($validFromGeoIP) AllowCountries\n"; |
18 |
|
|
+ $externalSSLAccess .= " env=AllowCountries"; |
19 |
|
|
+} |