From eaf9b01e3f3515aa4467ac02172aa805d8b50c43 Mon Sep 17 00:00:00 2001 From: TheZupZup <16434778+TheZupZup@users.noreply.github.com> Date: Sat, 11 Apr 2026 16:23:36 -0400 Subject: [PATCH] Fix WebDAV startup with WsgiDAV 4.x middleware stack --- nexanote/sync/server.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nexanote/sync/server.py b/nexanote/sync/server.py index 7622b72..21f82a9 100644 --- a/nexanote/sync/server.py +++ b/nexanote/sync/server.py @@ -12,6 +12,7 @@ import argparse import hashlib +import importlib.util import logging import sys from pathlib import Path @@ -80,7 +81,6 @@ def build_app( # Middleware "middleware_stack": [ - "wsgidav.debug_filter.WsgiDavDebugFilter", "wsgidav.error_printer.ErrorPrinter", "wsgidav.http_authenticator.HTTPAuthenticator", "wsgidav.dir_browser.WsgiDavDirBrowser", @@ -88,6 +88,9 @@ def build_app( ], } + if importlib.util.find_spec("wsgidav.debug_filter"): + config["middleware_stack"].insert(0, "wsgidav.debug_filter.WsgiDavDebugFilter") + return WsgiDAVApp(config)