Skip to content

Commit

Permalink
Added query argument https for update route, downloads search.tsv via…
Browse files Browse the repository at this point in the history
… https (#12)
  • Loading branch information
MartinMikita committed May 12, 2018
1 parent 20175c9 commit 983cade
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/websearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ def update(domain):

domain_id = domain.replace('.', '').replace(':', '').replace('/', '').encode('utf-8')
data['domain'] = domain.encode('utf-8')
url = 'http://%(domain)s/search.tsv' % data
data['protocol'] = 'http'
if request.args.get('https', None):
data['protocol'] = 'https'
url = '%(protocol)s://%(domain)s/search.tsv' % data
path = '/data/%(domain)s/search.tsv' % data

try:
Expand Down

0 comments on commit 983cade

Please sign in to comment.