mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-26 09:37:25 +00:00
Fix issue with login security
This commit is contained in:
parent
855727643b
commit
ab5dd535e9
2 changed files with 13 additions and 12 deletions
|
@ -37,13 +37,6 @@ def create_app():
|
||||||
|
|
||||||
toolbar = DebugToolbarExtension(app)
|
toolbar = DebugToolbarExtension(app)
|
||||||
|
|
||||||
|
|
||||||
@app.errorhandler(404)
|
|
||||||
def page_not_found(e):
|
|
||||||
if request.path == '/':
|
|
||||||
return redirect(url_for('series'), code=302)
|
|
||||||
return render_template('404.html'), 404
|
|
||||||
|
|
||||||
socketio.init_app(app, path=base_url.rstrip('/')+'/socket.io', cors_allowed_origins='*', async_mode='threading')
|
socketio.init_app(app, path=base_url.rstrip('/')+'/socket.io', cors_allowed_origins='*', async_mode='threading')
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,14 @@ def login_required(f):
|
||||||
return wrap
|
return wrap
|
||||||
|
|
||||||
|
|
||||||
|
@app.errorhandler(404)
|
||||||
|
@login_required
|
||||||
|
def page_not_found(e):
|
||||||
|
if request.path == '/':
|
||||||
|
return redirect(url_for('series'), code=302)
|
||||||
|
return render_template('404.html'), 404
|
||||||
|
|
||||||
|
|
||||||
@app.route('/login/', methods=["GET", "POST"])
|
@app.route('/login/', methods=["GET", "POST"])
|
||||||
def login_page():
|
def login_page():
|
||||||
error = ''
|
error = ''
|
||||||
|
|
Loading…
Reference in a new issue