mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
LibWebView: Add an API to query if a host is on the Public Suffix List
This commit is contained in:
parent
d4615c47a4
commit
9f9e5c0f55
3 changed files with 20 additions and 8 deletions
|
@ -45,6 +45,15 @@ static Optional<URL> query_public_suffix_list(StringView url_string)
|
|||
return {};
|
||||
}
|
||||
|
||||
bool is_public_suffix([[maybe_unused]] StringView host)
|
||||
{
|
||||
#if defined(ENABLE_PUBLIC_SUFFIX)
|
||||
return PublicSuffixData::the()->is_public_suffix(host);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
Optional<String> get_public_suffix([[maybe_unused]] StringView host)
|
||||
{
|
||||
#if defined(ENABLE_PUBLIC_SUFFIX)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue