ImgurViewer
ImgurViewer copied to clipboard
Some header control settings
Some sites like danbooru (cdn.donmai.us) require a browser user-agent, pixiv (i.pximg.net) requires a referer be set to https://pixiv.net, some sites like gyazo, photobucket, imgur, reddit, and tumblr just require the accept header to be deleted on their cdn links. Typically on browsers, I use a web-ext called simple-modify-headers. I think such a feature could be kinda neat in ImgurViewer, and can potentially make it have a simpler default rule set for some sites and an easier route to PRs. Within the web-ext it imports and exports rules from JSON.
{
"format_version": "1.2",
"target_page": "",
"headers": [
{
"url_contains": "i.gyazo.com",
"action": "delete",
"header_name": "accept",
"header_value": "",
"comment": "",
"apply_on": "req",
"status": "on"
},
{
"url_contains": ".photobucket.com",
"action": "delete",
"header_name": "accept",
"header_value": "",
"comment": "",
"apply_on": "req",
"status": "on"
},
{
"url_contains": "i.redd.it",
"action": "delete",
"header_name": "accept",
"header_value": "",
"comment": "",
"apply_on": "req",
"status": "on"
},
{
"url_contains": "preview.redd.it",
"action": "delete",
"header_name": "accept",
"header_value": "",
"comment": "",
"apply_on": "req",
"status": "on"
},
{
"url_contains": "i.imgur.com",
"action": "delete",
"header_name": "accept",
"header_value": "",
"comment": "",
"apply_on": "req",
"status": "on"
},
{
"url_contains": "media.tumblr.com",
"action": "delete",
"header_name": "accept",
"header_value": "",
"comment": "",
"apply_on": "req",
"status": "on"
},
{
"url_contains": "i.pximg.net",
"action": "add",
"header_name": "referer",
"header_value": "https://pixiv.net",
"comment": "",
"apply_on": "req",
"status": "on"
}
],
"debug_mode": false,
"show_comments": true,
"use_url_contains": true
}