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 Nov 12, 2024
1 parent c3016a4 commit 180ab5e
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 180ab5e

Please sign in to comment.