Skip to content

Commit

Permalink
feat(mediaProxy): update predefined referer spoofing rules for restri…
Browse files Browse the repository at this point in the history
…cted media resources
  • Loading branch information
AiraNadih authored and fguillot committed Nov 13, 2024
1 parent c3016a4 commit f0fe911
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/reader/rewrite/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f0fe911

Please sign in to comment.