Use workaround to kill document.referrer bug.
Our workaround is: on cross-domain navigation, cancel request at onBeforeRequest, then make freshnew one, like directly hit (currently only implemented for GET method, other methods remain as is)


(Don't check this if you don't enable above workaround)
Don't handle onBeforeSendHeaders so reduce CPU consumption.
(give up this addon's in-page requests HTTP Header referer url trimming)
#ifndef CHROME (If you have above workaround enabled, and your Firefox 's network.http.referer.trimmingPolicy = 2, no onBeforeSendHeaders handling is 98% the same as do handling) #else #endif

Allowlist
In addition to hard-coded allowlist, user can add allowed domains
(Experimental feature! The mechanism may be changed in the future)

User Allowlist:


Write in JSON.
Example:
    [
        ".baidu.com", 
        [ ".google.com", ".youtube.com"], 
        "twitter.com", 
    ]
                        

Above example means no handling referer when:
  • *.baidu.com ↔ *.baidu.com
  • *.google.com ↔ *.google.com
  • *.google.com ↔ *.youtube.com
  • *.youtube.com ↔ *.youtube.com
  • twitter.com ↔ twitter.com

Hard-coded allowlist: