# Filtering GDIntercept allows you to filter requests and responses with a set of options to make your event listeners more specific. This is done by using the `RequestFilter` and `ResponseFilter` classes in the event listener constructors. ## Origin Filter GDIntercept has a few origins it recognizes, these are: - `OriginFilter::GD_FILTER`: Every request sent to: - - - `OriginFilter::GD_CDN_FILTER`: Every request sent to: - - - `OriginFilter::ROBTOP_GAMES_FILTER`: Every request sent to: - - - - - `OriginFilter::NEWGROUNDS_FILTER`: Every request sent to: - - `OriginFilter::GEODE_FILTER`: Every request sent to: - - `OriginFilter:LOCALHOST_FILTER`: Every request sent to: - - `OriginFilter::OTHER_FILTER`: Every request that doesn't match any of the above - `OriginFilter::ALL_FILTER`: Every request ```cpp RequestFilter(OriginFilter::GD_FILTER) ResponseFilter(OriginFilter::GD_CDN_FILTER) ``` ## URL Filter You can also filter requests based on a part of the URL (excluding the query string). This is done by giving a string vector to the filter constructor: ```cpp // Possible URLs: // https://www.boomlings.com/database/getGJLevels21.php // https://geometrydash.com/index.php RequestFilter({"boomlings.com/database", "geometrydash.com"}) // Possible URLs: // https://boomlings.com/database/accounts/loginGJAccount.php ResponseFilter({"https://boomlings.com/database"}) ``` ## Node Listener Filter Node listeners require the filter to be provided in the template arg. As a result, the last parameters of the `this->template addEventListener` functions are the filters constructor parameters: ```cpp // The filter parameter is optional, otherwise it can be filled in with any of the standard parameters this->template addEventListener([=](const RequestEvent* event) { // ... }, OriginFilter::ALL_FILTER); ```