Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "url" : /^.*$/, // if request going to any domain
- "headers" : function() {
- var headers = {};
- // block referer for request coming from any domain except twitter.com
- if (request.window_location.host != "twitter.com")
- {
- headers = {
- "Referer" : null
- };
- }
- return headers;
- }
- },
- {
- "url" : /^(?!https:\/\/twitter.com\/).*$/, // if request going to other domain than twitter.com
- "headers" : function() {
- var headers = {};
- if (request.window_location.host == "twitter.com") // block referer for request coming from twitter.com
- {
- headers = {
- "Referer" : null
- };
- }
- return headers;
- }
- }
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement