1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

feat(mediaProxy): update predefined referer spoofing rules for restricted media resources

This commit is contained in:
AiraNadih 2024-11-12 18:28:58 +08:00 committed by Frédéric Guillot
parent c3016a4c55
commit f0fe91172f

View file

@ -68,6 +68,14 @@ var PredefinedRefererRules = []RefererRule{
URLPattern: regexp.MustCompile(`^https://sp1\.piokok\.com`),
Referer: "https://sp1.piokok.com",
},
{
URLPattern: regexp.MustCompile(`^https://f\.video\.weibocdn\.com`),
Referer: "https://weibo.com",
},
{
URLPattern: regexp.MustCompile(`^https://img\.hellogithub\.com`),
Referer: "https://hellogithub.com",
},
}
// GetRefererForURL returns the referer for the given URL if it exists, otherwise an empty string.