mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
refactor(internal): add an urllib.DomainWithoutWWW function
This commit is contained in:
parent
af15032145
commit
b296f21e98
3 changed files with 7 additions and 3 deletions
|
@ -486,7 +486,7 @@ func isBlockedResource(absoluteURL string) bool {
|
|||
}
|
||||
|
||||
func isValidIframeSource(iframeSourceURL string) bool {
|
||||
iframeSourceDomain := strings.TrimPrefix(urllib.Domain(iframeSourceURL), "www.")
|
||||
iframeSourceDomain := urllib.DomainWithoutWWW(iframeSourceURL)
|
||||
|
||||
if _, ok := iframeAllowList[iframeSourceDomain]; ok {
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue