Package io.antmedia.filter
Class IPFilter
java.lang.Object
io.antmedia.filter.AbstractFilter
io.antmedia.filter.IPFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
-
Field Summary
Fields inherited from class io.antmedia.filter.AbstractFilter
BROADCAST_OBJECT, config, logger, streamStats
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doFilter
(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) This filter is being used for accessing applications REST API so that return valid is if {@link #isAllowed) or it's coming from isNodeCommunicationTokenValid Check the {@code RestProxyFilter} for getting more information about isNodeCommunicationTokenValidboolean
Test if a remote's IP address is allowed to proceed.Methods inherited from class io.antmedia.filter.AbstractFilter
checkCIDRList, destroy, getAntMediaApplicationAdapter, getAppContext, getAppSettings, getBroadcast, getConfig, getDataStore, getServerSettings, getStreamStats, getTokenService, getWebApplicationContext, init, setConfig, setTokenService
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
IPFilter
public IPFilter()
-
-
Method Details
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException This filter is being used for accessing applications REST API so that return valid is if {@link #isAllowed) or it's coming from isNodeCommunicationTokenValid Check the {@code RestProxyFilter} for getting more information about isNodeCommunicationTokenValid- Throws:
IOException
jakarta.servlet.ServletException
-
isAllowed
Test if a remote's IP address is allowed to proceed.- Parameters:
remoteIPAddress
- The remote's IP address, as a string- Returns:
- true if allowed
-