Chirmaya / BooruSlideshow

A Google Chrome extension for a slideshow of boorus.
https://github.com/Chirmaya/BooruSlideshow/raw/master/BooruSlideshow.zip
Other
41 stars 24 forks source link

Danbooru images return 403 #134

Closed SmilyPie1989 closed 7 months ago

SmilyPie1989 commented 8 months ago

Some recent changes seem to have been made to how Danbooru handles bot and app traffic that causes images to return 403.

See: https://danbooru.donmai.us/forum_topics/25845?page=2#forum_post_263939

clst commented 8 months ago

can be fixed by either adding a referer to cdn.donmai.us images or including cdn.donmai.us in the MFv3 hosts so it gets all the cookies.

SmilyPie1989 commented 7 months ago

For anyone like me who implemented the solution properly and Danbooru still didn't return 200 OK, you have to actually remove the extension from Chrome and then reinstall it after making the changes. Changes to the .js files appeared to work without reinstallation (as evidenced by me breaking it one time), but I guess manifest changes don't go through until reinstallation.

To fix the issue, I modified the "requestHeaders" block in "rules_header_referer.json". I changed "header" to "Referer" and "value" to "DanbooruUser######" with the #'s being my user ID. I also added "https://cdn.donmai.us/*" to the "host_permissions" in "manifest.json".

It's possible only one of the two file modifications are necessary to fix this, but it works for me as is.

squashreel commented 6 months ago

Is there a way to fix this in the firefox extension? I wasn't able to find the json files mentioned. Thank you