Private
Public Access
Add hardening and deployment: admin dashboard, security headers, install docs
Adds an admin-only dashboard (apps/core) surfacing feeds that are failing to fetch, with error messages, subscriber counts, and a one-click retry that resets backoff and re-queues the fetch. Hardens config/settings/prod.py with the remaining standard Django security settings (HSTS preload, nosniff, referrer-policy, frame-options, SameSite cookies) plus a Content-Security-Policy header via django-csp, as a second layer behind nh3's HTML sanitization of feed content. Adds docs/install.md (pip + gunicorn + systemd + nginx, SQLite and Postgres both covered) plus the systemd units and nginx snippet it references, LICENSE (AGPL-3.0-or-later, matching pyproject.toml), and an updated README. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7577110238
commit
3f6474ce94
16 files changed
+1226
-6
No files matched your search
@@ -0,0 +1,49 @@
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Dashboard — Evection{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<ul class="dashboard-stats">
|
||||
<li>{{ stats.feed_count }} feed(s) — {{ stats.active_feed_count }} active</li>
|
||||
<li>{{ stats.subscription_count }} subscription(s)</li>
|
||||
<li>{{ stats.article_count }} article(s)</li>
|
||||
<li>{{ stats.error_feed_count }} feed(s) currently erroring</li>
|
||||
</ul>
|
||||
|
||||
<h2>Feeds with errors</h2>
|
||||
{% if erroring_feeds %}
|
||||
<table class="feed-error-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Feed</th>
|
||||
<th>Subscribers</th>
|
||||
<th>Status</th>
|
||||
<th>Error count</th>
|
||||
<th>Last fetched</th>
|
||||
<th>Last error</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for feed in erroring_feeds %}
|
||||
<tr>
|
||||
<td><a href="{{ feed.site_url|default:feed.feed_url }}">{{ feed.title|default:feed.feed_url }}</a></td>
|
||||
<td>{{ feed.subscriber_count }}</td>
|
||||
<td>{{ feed.get_last_fetch_status_display }}</td>
|
||||
<td>{{ feed.fetch_error_count }}</td>
|
||||
<td>{{ feed.last_fetched_at|default:"never" }}</td>
|
||||
<td>{{ feed.last_error_message|default:"—" }}</td>
|
||||
<td>
|
||||
<form method="post" action="{% url 'core:retry_feed' feed.id %}">
|
||||
{% csrf_token %}
|
||||
<button type="submit">Retry now</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No feeds are currently erroring.</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user