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
Ben Busby 2022-04-26 16:28:04 -06:00
parent 62d7491936
commit 2490089645
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 0 additions and 16 deletions

View File

@ -432,22 +432,6 @@ def config():
return redirect(url_for('.index'), code=403) 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}') @app.route(f'/{Endpoint.imgres}')
@session_required @session_required
@auth_required @auth_required