summaryrefslogtreecommitdiff
path: root/searx/https_rewrite.py
blob: 44ada9450d9640f3ac3d6f6e57912ae3832baeee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import re

# https://gitweb.torproject.org/\
# pde/https-everywhere.git/tree/4.0:/src/chrome/content/rules

# HTTPS rewrite rules
https_rules = (
    # from
    (re.compile(r'^http://(www\.|m\.|)?xkcd\.(?:com|org)/', re.I | re.U),
     # to
     r'https://\1xkcd.com/'),
    (re.compile(r'^https?://(?:ssl)?imgs\.xkcd\.com/', re.I | re.U),
     r'https://sslimgs.xkcd.com/'),
)