mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-06 21:16:56 -06:00
fixed hidden url implementation finally
This commit is contained in:
@@ -89,21 +89,19 @@ def boolparse(string, default=False):
|
||||
else:
|
||||
return False
|
||||
|
||||
@app.errorhandler(404)
|
||||
def page_not_found(e):
|
||||
return '404<br>${}'.format(app.config['HIDDEN_URL'])
|
||||
|
||||
hidden_url = app.config['HIDDEN_URL']
|
||||
hidden_help_url = hidden_url + '/help'
|
||||
|
||||
@app.route(hidden_help_url)
|
||||
@app.route('/hidden<id>/help')
|
||||
@login_required
|
||||
def hidden_help():
|
||||
def hidden_help(id):
|
||||
if id != app.config['HIDDEN_URL']:
|
||||
return 'bad id'
|
||||
else:
|
||||
return render_template('hidden_help.html')
|
||||
|
||||
@app.route(hidden_url)
|
||||
@app.route('/hidden<id>')
|
||||
@login_required
|
||||
def hidden():
|
||||
def hidden(id):
|
||||
if id != app.config['HIDDEN_URL']:
|
||||
return 'bad id'
|
||||
# Handled within request
|
||||
tags = request.args.get('tags') or 'trap'
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user