1
0
Fork 0
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:
Frédéric Guillot 2025-06-13 20:44:47 -07:00
parent 44c48d109f
commit c2569d2878
5 changed files with 119 additions and 40 deletions

View file

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