mirror of
https://github.com/Lynnesbian/FediBooks/
synced 2024-11-25 08:38:59 +00:00
exempt /push from authenticated pages
This commit is contained in:
parent
80b683cfde
commit
8e5538dc7d
1 changed files with 6 additions and 1 deletions
7
webui.py
7
webui.py
|
@ -22,7 +22,7 @@ scopes = ['write:statuses', 'write:accounts', 'read:accounts', 'read:notificatio
|
|||
|
||||
@app.before_request
|
||||
def login_check():
|
||||
if request.path not in ['/', '/about', '/welcome', '/login', '/signup', '/do/login', '/do/signup', '/static/style.css']:
|
||||
if request.path not in ['/', '/about', '/welcome', '/login', '/signup', '/do/login', '/do/signup', '/static/style.css'] and not request.path.startswith("/push"):
|
||||
# page requires authentication
|
||||
if 'user_id' not in session:
|
||||
return redirect(url_for('home'))
|
||||
|
@ -489,6 +489,11 @@ def do_authenticate_bot():
|
|||
session['step'] = 4
|
||||
return redirect(url_for("bot_create"), 303)
|
||||
|
||||
@app.route("/push/<id>")
|
||||
def push(id):
|
||||
c = db.cursor()
|
||||
print(request.form)
|
||||
|
||||
@app.route("/do/signup", methods=['POST'])
|
||||
def do_signup():
|
||||
# email validation is basically impossible without actually sending an email to the address
|
||||
|
|
Loading…
Reference in a new issue