mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 16:29:17 +02:00
[enh] https rewrite basics
This commit is contained in:
parent
b44643222f
commit
96c8b20a04
3 changed files with 34 additions and 3 deletions
14
searx/https_rewrite.py
Normal file
14
searx/https_rewrite.py
Normal file
|
@ -0,0 +1,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/'),
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue