fix: show login flashes and CSRF errors; proxy and cookie options for HTTPS deploys
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,6 +7,15 @@
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
|
||||
</head>
|
||||
<body>
|
||||
{% with msgs = get_flashed_messages(with_categories=true) %}
|
||||
{% if msgs %}
|
||||
<div class="flash-wrap" role="status">
|
||||
{% for category, message in msgs %}
|
||||
<div class="flash {{ category }}">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
<h1>本地导航站</h1>
|
||||
<form method="post" novalidate>
|
||||
{{ form.hidden_tag() }}
|
||||
{% if request.method == "POST" and form.csrf_token.errors %}
|
||||
{% for e in form.csrf_token.errors %}
|
||||
<div class="errors" role="alert">{{ e }}</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<div class="form-row">
|
||||
{{ form.username.label }}
|
||||
{{ form.username(class="") }}
|
||||
|
||||
Reference in New Issue
Block a user