Remove unused `/url` endpoint

The `/url` endpoint was previously used as a way of mirroring the
`/url?q=<result domain>` formatting of locations in search results from
Google. Rather than have this unnecessary intermediary step, the result
path was extracted and used as the immediate path for each result item
instead.

This endpoint hasn't been in use for many versions and has been in need
of removal for quite some time.
pull/736/head
Ben Busby 2 years ago
parent 62d7491936
commit 2490089645
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1

@ -432,22 +432,6 @@ def config():
return redirect(url_for('.index'), code=403)
@app.route(f'/{Endpoint.url}', methods=['GET'])
@session_required
@auth_required
def url():
if 'url' in request.args:
return redirect(request.args.get('url'))
q = request.args.get('q')
if len(q) > 0 and 'http' in q:
return redirect(q)
else:
return render_template(
'error.html',
error_message='Unable to resolve query: ' + q)
@app.route(f'/{Endpoint.imgres}')
@session_required
@auth_required

Loading…
Cancel
Save