Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Referer header to Pixiv defaults to reduce 403 responses #3090

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m6man
Copy link

@m6man m6man commented Jan 26, 2024

For some posts Pixiv responds with a 403 on webserver layer (nginx response).

I assume this is a measure against hotlinking all images of a gallery with ~14+ images on another website, might be a simple regex in nginx to require this header for /img-original/...p15.img and upwards (not further analyzed).

During investigation i came across this extension which also simply adds this header to direct requests to media:
https://chromewebstore.google.com/detail/pixiv-image-extension/cpacgkdedbhileoelnmdegkedcoammhg

This is a draft PR until i've investigated other failed downloads or until i'm sure this change actually helps.

@Bionus
Copy link
Owner

Bionus commented Jan 28, 2024

So that extension adds the referer header with value "http://pixiv.com/" on the pximg.net domain, but your change will add the Pixiv header instead. Shouldn't it be referer?

Also, the "referer_image=page" value in the settings will automatically set the Referer header to whatever URL is the current search page using. You could use the domain with "referer_image=host" instead, but would that really help?

Did you meet any "403 forbidden" errors when using Grabber?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants