From 1de49d51fb340e30dd9332b5f1b397cacd52f92e Mon Sep 17 00:00:00 2001 From: marc Date: Sat, 20 Jun 2026 19:02:58 +0200 Subject: [PATCH] WebDAV: move DAV On to block, fixes 405 with Alias handles filesystem options; handles DAV method routing and auth. DAV On in a block doesn't reliably enable WebDAV methods on Alias-mapped paths in Apache 2.4. Co-Authored-By: Claude Sonnet 4.6 --- app.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 15a642a..1a6cf89 100644 --- a/app.py +++ b/app.py @@ -337,14 +337,17 @@ def _write_webdav_conf(shares): f'# BEGIN {_WEBDAV_MARK} {s["name"]}\n', f'Alias /dav/{s["name"]} {s["path"]}\n', f'\n', + ' Options Indexes\n', + ' AllowOverride None\n', + ' Require all granted\n', + '\n', + f'\n', ' DAV On\n', ' AuthType Basic\n', ' AuthName "MicroNAS WebDAV"\n', f' AuthUserFile {WEBDAV_PASSWD}\n', f' {require}\n', - ' Options Indexes\n', - ' AllowOverride None\n', - '\n', + '\n', f'# END {_WEBDAV_MARK} {s["name"]}\n\n', ] with open(WEBDAV_CONF, 'w') as f: