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

Edit headers for repubblica.it #15

Merged
merged 2 commits into from
Dec 11, 2021
Merged

Edit headers for repubblica.it #15

merged 2 commits into from
Dec 11, 2021

Conversation

gall0ws
Copy link
Owner

@gall0ws gall0ws commented Dec 4, 2021

Added a backgound script to manipulate the HTTP request for repubblica.it

After #14 I discovered that if there's something like google in the Referer header, repubblica.it disables the paywall (LOL).
I set "m.google.it" that looks somewhat legit, but really you can use "bypass.paywall.google.xxx" and it would work as well.

I'm disabling the Cookie header, because it looks they check this one as well... I'm not very proud of this, because the user could do that from the browser itself (I already do that for corriere.it), but whatever.

It should work on Firefox and Chrome-based browsers.
Tamper/GreaseMonkey requires a different approach. Unless someone is willing to make this code work with GM_* thingies, I reckon we should drop the support.

Please take a look at the changes and test it.

@gall0ws gall0ws requested a review from valepert December 4, 2021 15:17
@gall0ws
Copy link
Owner Author

gall0ws commented Dec 5, 2021

TODO: we should remove the "paywall" div on the bottom of the page, the code to do that is already there...

@valepert
Copy link
Collaborator

valepert commented Dec 8, 2021

Works for me. I think README.md needs an update but maybe it's better handling that in a different issue.

@gall0ws gall0ws merged commit f6600b2 into master Dec 11, 2021
@gall0ws gall0ws deleted the issue_014_referer_trick branch December 11, 2021 12:10
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.

2 participants