1
Fork 0
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:
Timothy Flynn 2023-10-20 10:42:34 -04:00 committed by Andreas Kling
parent d4615c47a4
commit 9f9e5c0f55
3 changed files with 20 additions and 8 deletions

View file

@ -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)