v1.0.55: POST redirect for clear + stray Enter (fix F5 resubmit warning)

This commit is contained in:
2026-07-27 10:34:08 +04:00
parent 338c080254
commit e540742e2e
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -1,4 +1,4 @@
from flask import Blueprint, current_app, render_template, request, make_response, jsonify
from flask import Blueprint, current_app, render_template, request, make_response, jsonify, redirect
from api.http_client import HttpClient, detect_endpoint
from operations.get_instances import get_organization, get_instances
@@ -76,7 +76,7 @@ def index():
return render_template("index.html", **ctx)
if action == "clear":
resp = make_response(_tmpl(organization=None, error=None, has_user_token=False))
resp = make_response(redirect("/"))
resp.delete_cookie("token")
return resp
@@ -121,6 +121,8 @@ def index():
else:
error = "Токен невалиден или просрочен"
if request.method == "POST":
return redirect("/")
return _tmpl()