Development

This commit is contained in:
Matthew Grotke 2026-05-24 03:47:34 -04:00
parent 8c2f10330d
commit 867911f276
3 changed files with 21 additions and 1 deletions

View file

@ -1,4 +1,5 @@
from flask import Blueprint, redirect, flash
import os
from flask import Blueprint, redirect, flash, send_file, abort
from auth import require_level
from config_utils import CONFIGS_DIR
@ -16,3 +17,11 @@ def clear_ddns_log():
except Exception as ex:
flash(f'Could not clear log: {ex}', 'error')
return redirect('/view/view_ddns')
@bp.route('/action/download_ddns_log', methods=['GET'])
@require_level('administrator')
def download_ddns_log():
if not os.path.isfile(LOG_FILE):
abort(404)
return send_file(LOG_FILE, as_attachment=True, download_name='ddns.log', mimetype='text/plain')