airtower-luna / referer-mod

Web Extension to modify the Referer header in HTTP requests
https://addons.mozilla.org/en-US/firefox/addon/referer-modifier/
GNU General Public License v3.0
46 stars 13 forks source link

Implement origin domain matching #68

Closed airtower-luna closed 2 years ago

airtower-luna commented 2 years ago

Origin matching allows users to let rules apply only to requests originating from certain domains. The origin is the domain that would appear in an unmodified Referer.

The rule to apply is selected based on the length of matches in the target and origin domains as follows:

Every rule must have a target domain, the origin domain is optional (origin match length is zero if missing).

Closes #15, closes #12.

Gitoffthelawn commented 2 years ago

Are you able to upload a beta version to AMO? AFAIK, only users intentionally installing a beta version on AMO will get it. Of course, you may want to confirm my AFAIK first!

airtower-luna commented 2 years ago

I had the same thought yesterday and checked. :smile_cat: Unfortunately it looks like AMO removed the beta channel option: https://extensionworkshop.com/documentation/publish/distribute-pre-release-versions/

What I could do is get a beta version signed for self-distribution and offer it through a pre-release here, with the catch that you'd have to manually update to further beta versions. Well, unless I also set up my own update manifest, too, but that's additional maintenance effort and if I forget to remove it before release that'd be bad. :sweat_smile:

Gitoffthelawn commented 2 years ago

Ah, now that you mention it, I am recalling that they made that change. 😸

Another option (and one I would personally prefer), is to publish another extension called "Referer Modifier BETA" on AMO. I've seen a few other extensions do this, and it seems to be a good workaround. I can write the blurb (description) for the beta version, if that helps you.

airtower-luna commented 2 years ago

A separate beta extension seems like a lot more trouble, both for me and people who want to test: It'd need a separate add-on ID, configuration wouldn't carry over automatically, and beta users would never automatically switch back to release, which means I'd have to maintain it indefinitely. I think I'll use self-distributed beta releases as needed, and set up an update manifest if it looks like there'll be many. Which I don't expect. :sweat_smile:

Anyway, a beta release won't happen until I merge this, which should be very soon. :slightly_smiling_face:

airtower-luna commented 2 years ago

@wvxwxvw, if you'd like to update the RU localization before I release 1.0 let me know and I'll create an issue listing the messages that changed. If not that's fine too, no pressure. :slightly_smiling_face:

airtower-luna commented 2 years ago

Beta release is here: https://github.com/airtower-luna/referer-mod/releases/tag/v1.0beta1

wvxwxvw commented 2 years ago

@airtower-luna I'll compare it myself.