Skip to content

Commit 983cade

Browse files
committed
Added query argument https for update route, downloads search.tsv via https (#12)
1 parent 20175c9 commit 983cade

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

web/websearch.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,10 @@ def update(domain):
510510

511511
domain_id = domain.replace('.', '').replace(':', '').replace('/', '').encode('utf-8')
512512
data['domain'] = domain.encode('utf-8')
513-
url = 'http://%(domain)s/search.tsv' % data
513+
data['protocol'] = 'http'
514+
if request.args.get('https', None):
515+
data['protocol'] = 'https'
516+
url = '%(protocol)s://%(domain)s/search.tsv' % data
514517
path = '/data/%(domain)s/search.tsv' % data
515518

516519
try:

0 commit comments

Comments
 (0)