Strabon
changeset 676:c7aa5e7dd068
Added directives to web.xml that enable filtering based on the string representation of the remote client's IP address.
Added a regular expression that is filters IP addresses that are usefull for NKUA.
Notice that this feature is Tomcat-specific
Added a regular expression that is filters IP addresses that are usefull for NKUA.
Notice that this feature is Tomcat-specific
author | Kostis Kyzirakos <kkyzir@di.uoa.gr> |
---|---|
date | Wed Oct 31 17:24:39 2012 +0200 (2012-10-31) |
parents | 322e3050c7e1 |
children | 3d517693f948 |
files | endpoint/WebContent/WEB-INF/web.xml |
line diff
1.1 --- a/endpoint/WebContent/WEB-INF/web.xml Wed Oct 31 00:26:42 2012 +0200 1.2 +++ b/endpoint/WebContent/WEB-INF/web.xml Wed Oct 31 17:24:39 2012 +0200 1.3 @@ -4,6 +4,22 @@ 1.4 xmlns:base="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 1.5 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 1.6 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 1.7 + 1.8 + <!-- Uncomment the following lines to enable ip filtering--> 1.9 + <!-- 1.10 + <filter> 1.11 + <filter-name>Remote Address Filter</filter-name> 1.12 + <filter-class>org.apache.catalina.filters.RemoteAddrFilter</filter-class> 1.13 + <init-param> 1.14 + <param-name>allow</param-name> 1.15 + <param-value>(195\.134\.(67|71)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(88\.197\.4[4-7]\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(195\.134\.105\.([01]?[0-9][0-9]?))</param-value> 1.16 + </init-param> 1.17 + </filter> 1.18 + <filter-mapping> 1.19 + <filter-name>Remote Address Filter</filter-name> 1.20 + <url-pattern>/*</url-pattern> 1.21 + </filter-mapping> 1.22 + --> 1.23 1.24 <display-name>StrabonEndpoint</display-name> 1.25 <context-param>