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.main
parent
62d7491936
commit
2490089645
|
@ -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…
Reference in New Issue