Rules will apply to the URL that meets the matching criteria. If multiple conditions are checked, all conditions must be met at the same time for this rule to be applied.
str
, then, in fact, the program will use the internal new RegExp(str)
to initialize the regular expression.$1
http://
URL prefixNote:
Regardless of whether the matching rules are met, as long as any exclusion condition is met, this item will not take effect on the current URL.
Through a custom function to realize a more flexible function, the specific use please see here
_header_editor_remove_
will remove this header (valid since 3.0.5)_header_editor_cancel_
will cancel this request (valid since 4.0.3)chrome.google.com/webstore
.The following example is not guaranteed to be valid, only as an example to help users familiarize themselves with the rules of the Header Editor
For example, the Google public library is redirected to the mirror image of University of Science and Technology of China:
Regular expressions is ^http(s?)://(ajax|fonts)\.googleapis\.com/(.*)
, redirect to https://$2.proxy.ustclug.org/$3
Redirect all HTTP requests of sale.jd.com
, item.jd.com
and www.jd.com
to the HTTPS:
Regular expressions is http://(sale|item|www).jd.com
, redirect to https://$1.jd.com
Redirect all wikipedia's HTTP requests to HTTPS:
Regular expressions is ^http://([^\/]+\.wikipedia\.org/.+)
, redirect to https://$1
Just modify the request header named User-Agent, but the function can only affect the ability of the server to determine UA, which can not be pseudo in local through JS