mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
refactor(sanitizer): use a map for iframe allow list
This commit is contained in:
parent
44c48d109f
commit
c2569d2878
5 changed files with 119 additions and 40 deletions
|
@ -298,6 +298,13 @@ func (p *Parser) parseLines(lines []string) (err error) {
|
|||
if port != "" {
|
||||
p.opts.listenAddr = ":" + port
|
||||
}
|
||||
|
||||
youtubeEmbedURL, err := url.Parse(p.opts.youTubeEmbedUrlOverride)
|
||||
if err != nil {
|
||||
return fmt.Errorf("config: invalid YOUTUBE_EMBED_URL_OVERRIDE value: %w", err)
|
||||
}
|
||||
p.opts.youTubeEmbedDomain = youtubeEmbedURL.Hostname()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue