#region ========================================================================= USING ===================================================================================== using System; #endregion namespace Lumina.Plugins.CoverArtArchive.Core; /// /// Defines the hosts of the Cover Art Archive and the Internet Archive, which are the only hosts the plugin queries, the only hosts it may follow a /// redirect to, and the only hosts it may fetch artwork from. The Cover Art Archive is not self hostable, so no other host can be a legitimate source. /// internal static class CoverArtArchiveHosts { /// /// Determines whether the provided host is one of the hosts the Cover Art Archive may delegate its responses to. /// /// The host to check. /// when the host is allowed, otherwise . public static bool IsAllowed(string host) { return host.Equals("coverartarchive.org", StringComparison.OrdinalIgnoreCase) || host.EndsWith(".coverartarchive.org", StringComparison.OrdinalIgnoreCase) || host.Equals("archive.org", StringComparison.OrdinalIgnoreCase) || host.EndsWith(".archive.org", StringComparison.OrdinalIgnoreCase); } }