UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Core::FURLRequestFilter Class Reference

#include <URLRequestFilter.h>

Public Types

using FRequestMap = TMap< const FString, const TArray< FString > >
 

Public Member Functions

 FURLRequestFilter ()=default
 
CORE_API FURLRequestFilter (const TCHAR *ConfigSectionRootName, const FString &ConfigFileName)
 
CORE_API FURLRequestFilter (const FRequestMap &InAllowedRequests)
 
CORE_API FURLRequestFilter (FRequestMap &&InAllowedRequests)
 
CORE_API void UpdateConfig (const TCHAR *ConfigSectionRootName, const FString &ConfigFileName)
 
bool IsEmpty () const
 
CORE_API bool IsRequestAllowed (FStringView InURL) const
 

Detailed Description

A filter that can used to restrict URL schemes and domains to known-safe values. Stores a map of schemes to domains: if the map is empty, no filtering is performed and any URL is allowed. Each key is a scheme (such as "https"). If a scheme is present, it will be allowed. Each value is an array of absolute domains or partial higher-level domains that are allowed for their scheme.

Absolute domains do not start with a period and will be matched exactly with domains from the input URL, for example, "epicgames.com".

Partial domains start with a period and will be matched with the ending of the input domain. Use these to allow all subdomains of the higher-level domain. For example, ".epicgames.com"

To allow both an absolute domain and all of its subdomains, provide two entries in the array, one with the period prefix and one without. For example, "epicgames.com" and ".epicgames.com".

Member Typedef Documentation

◆ FRequestMap

using UE::Core::FURLRequestFilter::FRequestMap = TMap<const FString, const TArray<FString> >

Constructor & Destructor Documentation

◆ FURLRequestFilter() [1/4]

UE::Core::FURLRequestFilter::FURLRequestFilter ( )
default

◆ FURLRequestFilter() [2/4]

UE::Core::FURLRequestFilter::FURLRequestFilter ( const TCHAR ConfigSectionRootName,
const FString &  ConfigFileName 
)

Initializes the allowlist map based on ini configs. Example syntax:

[ConfigSectionRootName https] !AllowedDomains=ClearArray +AllowedDomains=epicgames.com

[ConfigSectionRootName http] !AllowedDomains=ClearArray +AllowedDomains=epicgames.com

◆ FURLRequestFilter() [3/4]

UE::Core::FURLRequestFilter::FURLRequestFilter ( const FRequestMap InAllowedRequests)

Initializes the allowlist based on an explicit scheme/domain map

◆ FURLRequestFilter() [4/4]

UE::Core::FURLRequestFilter::FURLRequestFilter ( FRequestMap &&  InAllowedRequests)

Member Function Documentation

◆ IsEmpty()

bool UE::Core::FURLRequestFilter::IsEmpty ( ) const
inline

Check if allow list is empty

◆ IsRequestAllowed()

bool UE::Core::FURLRequestFilter::IsRequestAllowed ( FStringView  InURL) const

Matches InURL against the configued list of allowed URL schemes and domains. Returns true if the URL is allowed.

◆ UpdateConfig()

void UE::Core::FURLRequestFilter::UpdateConfig ( const TCHAR ConfigSectionRootName,
const FString &  ConfigFileName 
)

Update the allow list by corresponding section in a config file


The documentation for this class was generated from the following files: