This commit is contained in:
Simon
2026-03-22 15:56:25 +00:00
parent 52f108da8e
commit fbe04fc752
12 changed files with 4960 additions and 26 deletions

View File

@@ -12,8 +12,7 @@ const FIREFOX_USER_AGENT: &str =
"Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0";
const HTML_ACCEPT: &str =
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8";
const IMAGE_ACCEPT: &str =
"image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5";
const IMAGE_ACCEPT: &str = "image/avif,image/webp,image/png,image/svg+xml,image/*;q=0.8,*/*;q=0.5";
fn root_referer() -> &'static str {
"https://pimpbunny.com/"
@@ -157,7 +156,9 @@ mod tests {
#[test]
fn rejects_non_thumb_or_non_pimpbunny_urls() {
assert!(!is_allowed_thumb_url("http://pimpbunny.com/contents/videos_screenshots/x.jpg"));
assert!(!is_allowed_thumb_url(
"http://pimpbunny.com/contents/videos_screenshots/x.jpg"
));
assert!(!is_allowed_thumb_url(
"https://pimpbunny.com/videos/example-video/"
));