Преглед на файлове

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

AiraNadih преди 1 година
родител
ревизия
f0fe91172f
променени са 1 файла, в които са добавени 8 реда и са изтрити 0 реда
  1. 8 0
      internal/reader/rewrite/rules.go

+ 8 - 0
internal/reader/rewrite/rules.go

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