![]() |
Ark Server API (ASA) - Wiki
|
#include <URLRequestFilter.h>
Collaboration diagram for UE::Core::FURLRequestFilter:Public Types | |
| using | FRequestMap = TMap<const FString, const TArray<FString>> |
Public Member Functions | |
| FURLRequestFilter ()=default | |
| FURLRequestFilter (const TCHAR *ConfigSectionRootName, const FString &ConfigFileName) | |
| FURLRequestFilter (const FRequestMap &InAllowedRequests) | |
| FURLRequestFilter (FRequestMap &&InAllowedRequests) | |
| bool | IsRequestAllowed (FStringView InURL) const |
Private Attributes | |
| FRequestMap | AllowedRequests |
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".
Definition at line 28 of file URLRequestFilter.h.
Definition at line 31 of file URLRequestFilter.h.
|
default |
| 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
| UE::Core::FURLRequestFilter::FURLRequestFilter | ( | const FRequestMap & | InAllowedRequests | ) |
Initializes the allowlist based on an explicit scheme/domain map
| UE::Core::FURLRequestFilter::FURLRequestFilter | ( | FRequestMap && | InAllowedRequests | ) |
| 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.
|
private |
Definition at line 60 of file URLRequestFilter.h.